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

training error #2

Closed
lixiang-ucas opened this issue Oct 29, 2019 · 1 comment
Closed

training error #2

lixiang-ucas opened this issue Oct 29, 2019 · 1 comment

Comments

@lixiang-ucas
Copy link

Hi Jean-Michel, thanks for sharing the code of your wonderful work. I've tried to run the training code but encountered the following error. Would you please help to figure out what's the problem? Thank your.

Traceback (most recent call last):
File "train_DFMnet.py", line 285, in
tf.app.run()
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 124, in run
_sys.exit(main(argv))
File "train_DFMnet.py", line 280, in main
run_training()
File "train_DFMnet.py", line 260, in run_training
feed_dict=feed_dict
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1128, in _run
feed_dict_tensor, options, run_metadata)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1344, in _do_run
options, run_metadata)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1363, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: flat indices[139, :] = [1, 1319] does not index into param (shape:[2,352,1500]).
[[Node: func_map_loss/GatherNd_2 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](func_map_loss/transpose_3, func_map_loss/concat_1)]]

Caused by op 'func_map_loss/GatherNd_2', defined at:
File "train_DFMnet.py", line 285, in
tf.app.run()
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 124, in run
sys.exit(main(argv))
File "train_DFMnet.py", line 280, in main
run_training()
File "train_DFMnet.py", line 202, in run_training
target_evecs_trans, target_evals
File "/home/mmvc/mmvc-ny-local/mmvc-ny-local-002/Xiang_Li/SURFMNet/DFMnet.py", line 83, in dfmnet_model
F, G
File "/home/mmvc/mmvc-ny-local/mmvc-ny-local-002/Xiang_Li/SURFMNet/loss_DFMnet.py", line 190, in func_map_layer
source_evecs, source_evecs_trans))/2
File "/home/mmvc/mmvc-ny-local/mmvc-ny-local-002/Xiang_Li/SURFMNet/loss_DFMnet.py", line 101, in penalty_desc_commutativity
F
= tf.gather_nd(F_trans, indices) # percent% of descriptors chosen
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2000, ingather_nd
"GatherNd", params=params, indices=indices, name=name)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3160, in create_op
op_def=op_def)
File "/home/mmvc/anaconda2/envs/XL_py3_tf15/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1625, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): flat indices[139, :] = [1, 1319] does not index into param (shape: [2,352,1500]).
[[Node: func_map_loss/GatherNd_2 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](func_map_loss/transpose_3, func_map_loss/concat_1)]]

@lixiang-ucas
Copy link
Author

solved by changing from tf1.4 to tf1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant