You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,I've been studing your code recently,but there is a problem when I try to run this code.when I try to run runner/CATN_runner.py,there is a error just like this
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:/Model-Code/CATN/runner/CATN_runner.py", line 162, in <module>
catn_runner.step_train(sess)
File "F:/Model-Code/CATN/runner/CATN_runner.py", line 90, in step_train
self.catn.train_step(sess)
File "F:\Model-Code\CATN\utils\CATN.py", line 372, in train_step
self.ratings_ph: ratings_batch_s,
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\client\session.py", line 877, in run
run_metadata_ptr)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\client\session.py", line 1100, in _run
feed_dict_tensor, options, run_metadata)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\client\session.py", line 1272, in _do_run
run_metadata)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\client\session.py", line 1291, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[57,12] = -1 is not in [0, 20001)
[[Node: embedding_lookup_2 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@Adam/update_pre_word_embeddings/AssignSub"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](pre_word_embeddings/read, embedding_lookup, embedding_lookup_5/axis)]]
Caused by op 'embedding_lookup_2', defined at:
File "F:/Model-Code/CATN/runner/CATN_runner.py", line 162, in <module>
catn_runner.step_train(sess)
File "F:/Model-Code/CATN/runner/CATN_runner.py", line 89, in step_train
self.catn = CATN(data, self.item_ave_rating_s, self.item_ave_rating_t, self.reviews, args, pkl_path)
File "F:\Model-Code\CATN\utils\CATN.py", line 48, in __init__
self.inference()
File "F:\Model-Code\CATN\utils\CATN.py", line 103, in inference
self.user_reviews_repr = tf.nn.embedding_lookup(self.word_embeddings, self.user_inputs)*self.user_inputs_mask
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\ops\embedding_ops.py", line 310, in embedding_lookup
transform_fn=None)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\ops\embedding_ops.py", line 133, in _embedding_lookup_and_transform
result = _clip(array_ops.gather(params[0], ids, name=name),
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2659, in gather
return gen_array_ops.gather_v2(params, indices, axis, name=name)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 3761, in gather_v2
"GatherV2", params=params, indices=indices, axis=axis, name=name)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
op_def=op_def)
File "E:\ruanjian\Miniconda3\envs\tensorflow110\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in __init__
self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): indices[57,12] = -1 is not in [0, 20001)
[[Node: embedding_lookup_2 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@Adam/update_pre_word_embeddings/AssignSub"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](pre_word_embeddings/read, embedding_lookup, embedding_lookup_5/axis)]]
The text was updated successfully, but these errors were encountered:
hi,I've been studing your code recently,but there is a problem when I try to run this code.when I try to run runner/CATN_runner.py,there is a error just like this
The text was updated successfully, but these errors were encountered: