nouhadziri/THRED

running error

Opened this issue · 2 comments

Hi, Thanks for your great work and clear codes, which inspire me a lot.

It seems that I just met a problem. When I execute the train command, there appears an "out of bounds "error, but not the "except tf.errors.OutOfRangeError" in hierarchical_base.py.

In detail,

Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/1THRED/thred/main.py", line 6, in
tf.app.run(main=thred_main)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/1THRED/thred/main.py", line 45, in main
model.train()
File "/1THRED/thred/models/hierarchical_base.py", line 124, in train
step_result = loaded_train_model.train(train_sess)
File "/1THRED/thred/models/thred/thred_model.py", line 511, in train
self.learning_rate])
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
run_metadata)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: slice index 2 of dimension 0 out of bounds.
[[{{node strided_slice_2}} = StridedSlice[Index=DT_INT32, T=DT_STRING, begin_mask=0, ellipsis_mask=0, end_mask=0, new_axis_mask=0, shrink_axis_mask=1](StringSplit:1, strided_slice_2/stack, strided_slice_2/stack_1, strided_slice_2/stack_2)]]
[[node IteratorGetNext (defined at /1THRED/thred/models/thred/thred_iterators.py:153) = IteratorGetNextoutput_shapes=[[?,?], [?,?], [?], [?], [?,?], [?], [?,?], [?,?], [?]], output_types=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32], _device="/job:localhost/replica:0/task:0/device:CPU:0"]

Could you please help me with that, thanks a lot.

ehsk commented

Hi, thanks for your interest in our work.

Could you provide the following information?

  • What is the model you are training?
  • Which data file are you using?
  • Tensorflow version

Thanks for your kind response.
Below are detailed information:

model: thred /random300 embedding
data: 5-turn dataset in reddit
tensorflow version: 1.12.0