0

私が現在取り組んでいるニューラル ネットワークは、スパース テンソルを入力として受け入れています。次のように 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.RecordReadertf.parse_example()

4

1 に答える 1