1

I tried code for answer in How to create dataset in the same format as the FSNS dataset?

for image class I am getting the following error:

File "createFsns.py", line 101, in 'image/class': _int64_feature(char_ids_padded), File "createFsns.py", 
line 52, in _int64_feature return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
TypeError: [20, 10, 0, 2, 10, 15, 0, 1, 1, 3] has type list, but expected one of: int, long

I corrected tf.train.Feature(int64_list=tf.train.Int64List(value=[value]) to tf.train.Feature(int64_list=tf.train.Int64List(value=value) Now getting this error:

tf.train.Feature(int64_list=tf.train.Int64List(value=value)) TypeError: Value must be iterable
Zoe
  • 27,060
  • 21
  • 118
  • 148
  • 1
    corrected tf.train.Feature(int64_list=tf.train.Int64List(value=[value]) to tf.train.Feature(int64_list=tf.train.Int64List(value=value) Now getting this error:- tf.train.Feature(int64_list=tf.train.Int64List(value=value)) TypeError: Value must be iterable – rohit saluja Jun 15 '18 at 09:31
  • rohit saluja, your solution worked for me. Why not make it an answer? – Syzygy Sep 19 '18 at 07:30

0 Answers0