rdipietro / miccai-2016-surgical-activity-rec

Recognizing Surgical Activities with Recurrent Neural Networks
Apache License 2.0
46 stars 14 forks source link

ValueError axis 0 #2

Open drozzy opened 3 years ago

drozzy commented 3 years ago

I have Python 2.7, Tensorflow 1.15.0.

Trying to run the code python train_and_summarize.py I get the following error:


Traceback (most recent call last):
  File "train_and_summarize.py", line 298, in <module>
    main()
  File "train_and_summarize.py", line 286, in main
    args.dropout_keep_prob)
  File "/home/andriy/Projects/miccai-2016-surgical-activity-rec/models.py", line 329, in __init__
    super(BidirectionalLSTMModel, self).__init__(*args)
  File "/home/andriy/Projects/miccai-2016-surgical-activity-rec/models.py", line 201, in __init__
    outputs = self._compute_rnn_outputs()
  File "/home/andriy/Projects/miccai-2016-surgical-activity-rec/models.py", line 333, in _compute_rnn_outputs
    reversed_inputs = tf.reverse(self.inputs, [False, True, False])
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/ops/gen_array_ops.py", line 8613, in reverse_v2
    "ReverseV2", tensor=tensor, axis=axis, name=name)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
    op_def=op_def)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
    attrs, op_def, compute_device)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
    op_def=op_def)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/framework/ops.py", line 1770, in __init__
    control_input_ops)
  File "/home/andriy/miniconda3/envs/miccai2016/lib/python2.7/site-packages/tensorflow_core/python/framework/ops.py", line 1610, in _create_c_op
    raise ValueError(str(e))
ValueError: axis 0 specified more than once. for 'ReverseV2' (op: 'ReverseV2') with input shapes: [?,?,14], [3] and with computed input tensors: input[1] = <0 1 0>.
nancynewlin-masi commented 1 year ago

I'm having the same issue. Python version 2.7 and Tensorflow version 1.8.0.