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

ValueError: Tried to convert 'y' to a tensor and failed. Error: None value not supported #13407

Closed
pairwiserr opened this issue Oct 7, 2019 · 0 comments
Labels
type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited.

Comments

@pairwiserr
Copy link

tf.__version__
'2.0.0'
tf.keras.__version__
'2.2.4-tf'

I'm running a very vanilla Sequential model API

model.fit(x_train_pad, y_train, verbose=2.0, validation_split=0.05, epochs=3, batch_size=64, shuffle=True)

where x_train_pad is a python list of tokens for some texts with pre-padding (0's in front of list). and y_train is a python list of 1.0 or 0.0 depending on whether the corresponding text in x_train_pad is positive or negative sentiment.

The ValueError is from grads = K.gradients(loss,params) in the get_gradients method of keras optimizer.py. Seems like tensorflow assigns a None value for gradient of value 0. But this is causing downstream error when I try fitting my Sequential model to my training dataset.

@gowthamkpr gowthamkpr added backend:tensorflow type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited. labels Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited.
Projects
None yet
Development

No branches or pull requests

3 participants