handwriting-generation
handwriting-generation copied to clipboard
Error - "Cannot convert a symbolic Tensor to a numpy array" while running train.py
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."
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
Hi @quasayush
Replace the np.square
with tf.math.square
and it will solve the issue. It worked for me.
Hi @quasayush Replace the
np.square
withtf.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.