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

Invalid argument: slice index 0 of dimension 0 out of bounds. #52

Open
musician-k opened this issue Mar 26, 2020 · 1 comment
Open

Invalid argument: slice index 0 of dimension 0 out of bounds. #52

musician-k opened this issue Mar 26, 2020 · 1 comment

Comments

@musician-k
Copy link

I run trianing.py, occur this error

the detail information is:

tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: slice index 0 of dimension 0 out of bounds.
[[node ctc/scan/strided_slice (defined at \Users\QZK\anaconda3\envs\crnn_keras\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]]
[[ctc/ToInt32_2/_503]]
(1) Invalid argument: slice index 0 of dimension 0 out of bounds.
[[node ctc/scan/strided_slice (defined at \Users\QZK\anaconda3\envs\crnn_keras\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]]
0 successful operations.
0 derived errors ignored.

Original stack trace for 'ctc/scan/strided_slice':
File "/ML_Projects/CRNN-Keras-master-new/training.py", line 16, in
model = get_Model(training=True)
File "\ML_Projects\CRNN-Keras-master-new\Model.py", line 86, in get_Model
loss_out = Lambda(ctc_lambda_func, output_shape=(1,), name='ctc')([y_pred, labels, input_length, label_length]) #(None, 1)
File "\Users\QZK\anaconda3\envs\crnn_keras\lib\site-packages\keras\engine\topology.py", line 617, in call
output = self.call(inputs, **kwargs)
File "\Users\QZK\anaconda3\envs\crnn_keras\lib\site-packages\keras\layers\core.py", line 663, in call
return self.function(inputs, **arguments)
File "\ML_Projects\CRNN-Keras-master-new\Model.py", line 17, in ctc_lambda_func
return K.ctc_batch_cost(labels, y_pred, input_length, label_length)
File "\Users\QZK\anaconda3\envs\crnn_keras\lib\site-packages\keras\backend\tensorflow_backend.py", line 3941, in ctc_batch_cost
sparse_labels = tf.to_int32(ctc_label_dense_to_sparse(y_true, label_length))

@tim120526
Copy link

hi ,have you solved it?

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

2 participants