私が現在取り組んでいるニューラル ネットワークは、スパース テンソルを入力として受け入れています。次のように TFRecord からデータを読み取っています。
_, examples = tf.TFRecordReader(options=options).read_up_to(
filename_queue, num_records=batch_size)
features = tf.parse_example(examples, features={
'input_feat': tf.SparseFeature(index_key='input_feat_idx',
value_key='input_feat_values',
dtype=tf.int64,
size=SIZE_FEATURE)})
それは魅力のように機能しtf.data
ますが、多くのタスクにとってより便利に見える API を見ていましtf.SparseTensor
た。何か案が?tf.RecordReader
tf.parse_example()