Dataset
由 SQL 查询的结果组成。
用法
tf.compat.v1.data.experimental.SqlDataset(
driver_name, data_source_name, query, output_types
)
参数
-
driver_name
包含数据库类型的 0-Dtf.string
张量。目前,唯一支持的值是'sqlite'。 -
data_source_name
一个 0-Dtf.string
张量,包含连接到数据库的连接字符串。 -
query
一个 0-Dtf.string
张量,包含要执行的 SQL 查询。 -
output_types
tf.DType
对象的元组,表示query
返回的列的类型。
属性
-
element_spec
此数据集元素的类型规范。dataset = tf.data.Dataset.from_tensor_slices([1, 2, 3]) dataset.element_spec TensorSpec(shape=(), dtype=tf.int32, name=None)
如需更多信息,请阅读本指南。
-
output_classes
返回此数据集元素的每个组件的类。 (已弃用)警告:此函数已弃用。它将在未来的版本中删除。更新说明:使用
tf.compat.v1.data.get_output_classes(dataset)
。 -
output_shapes
返回此数据集元素的每个组件的形状。 (已弃用)警告:此函数已弃用。它将在未来的版本中删除。更新说明:使用
tf.compat.v1.data.get_output_shapes(dataset)
。 -
output_types
返回此数据集元素的每个组件的类型。 (已弃用)警告:此函数已弃用。它将在未来的版本中删除。更新说明:使用
tf.compat.v1.data.get_output_types(dataset)
。
相关用法
- Python tf.compat.v1.data.experimental.SqlDataset.reduce用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.as_numpy_iterator用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.concatenate用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.cardinality用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.padded_batch用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.take用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.interleave用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.shard用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.take_while用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.from_tensors用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.unique用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.cache用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.scan用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.get_single_element用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.prefetch用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.map用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.zip用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.make_initializable_iterator用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.shuffle用法及代码示例
- Python tf.compat.v1.data.experimental.SqlDataset.bucket_by_sequence_length用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.compat.v1.data.experimental.SqlDataset。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。