Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running error #27

Open
xieexiaotuzi opened this issue May 21, 2020 · 2 comments
Open

running error #27

xieexiaotuzi opened this issue May 21, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@xieexiaotuzi
Copy link

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
Copy link
Collaborator

ehsk commented May 21, 2020

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

@ehsk ehsk added the bug Something isn't working label May 21, 2020
@xieexiaotuzi
Copy link
Author

Thanks for your kind response.
Below are detailed information:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants