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_typestf.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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
