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

Error - "Cannot convert a symbolic Tensor to a numpy array" while running train.py #26

Open
quasayush opened this issue Apr 3, 2021 · 2 comments

Comments

@quasayush
Copy link

quasayush commented Apr 3, 2021

Greetings Sir
Thank a lot for providing such a nice implementation. However, I was facing some issues while implementing the code.
First of all in new numpy version allow_pickle is False by default so I solved one of the error by using allow_pickle=True in np.load statements in batch_generator.py

However, while trying to run train.py I am getting an error "NotImplementedError: Cannot convert a symbolic Tensor (model/rnn_1/while/rnn/rnn_model/window/add_1:0) to a numpy array."

2

This is same error I am getting while trying to use pretrained model

I am using Tensorflow 1.15.2 and numpy 1.19.5 and running on Google Colab

@quasayush quasayush changed the title Error while running train.py Error - "Cannot convert a symbolic Tensor to a numpy array" while running train.py Apr 3, 2021
@pcsingh
Copy link

pcsingh commented May 26, 2021

Hi @quasayush
Replace the np.square with tf.math.square and it will solve the issue. It worked for me.

@ShubhamKumar2802
Copy link

ShubhamKumar2802 commented May 1, 2022

Hi @quasayush
Replace the np.square with tf.math.square and it will solve the issue. It worked for me.

Hey @pcsingh
I've made the changes you mentioned but the code still throws the same error for me.

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

3 participants