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
I'm trying to implement this code (not on colab) with tf 1.10 and keras 2.2.2. I have managed to run data-processing.py but taining.py gives the following error:
Traceback (most recent call last):
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1576, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 1 but is rank 2 for 'strided_slice' (op: 'StridedSlice') with input shapes: [?,3], [1,7], [1,7], [1].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "training.py", line 189, in
train_classes = classes[index[0:7]]
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 524, in _slice_helper
name=name)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 690, in strided_slice
shrink_axis_mask=shrink_axis_mask)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 8232, in strided_slice
name=name)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1731, in init
control_input_ops)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1579, in _create_c_op
raise ValueError(str(e))
ValueError: Shape must be rank 1 but is rank 2 for 'strided_slice' (op: 'StridedSlice') with input shapes: [?,3], [1,7], [1,7], [1].
I have tried reshaping the tensor but that also does not work. Suggestions would be appreciated.
The text was updated successfully, but these errors were encountered:
I'm trying to implement this code (not on colab) with tf 1.10 and keras 2.2.2. I have managed to run data-processing.py but taining.py gives the following error:
Traceback (most recent call last):
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1576, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 1 but is rank 2 for 'strided_slice' (op: 'StridedSlice') with input shapes: [?,3], [1,7], [1,7], [1].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "training.py", line 189, in
train_classes = classes[index[0:7]]
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 524, in _slice_helper
name=name)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 690, in strided_slice
shrink_axis_mask=shrink_axis_mask)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 8232, in strided_slice
name=name)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1731, in init
control_input_ops)
File "/home/ms-thesis/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1579, in _create_c_op
raise ValueError(str(e))
ValueError: Shape must be rank 1 but is rank 2 for 'strided_slice' (op: 'StridedSlice') with input shapes: [?,3], [1,7], [1,7], [1].
I have tried reshaping the tensor but that also does not work. Suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: