-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Tried to convert 'y' to a tensor and failed. Error: None values not supported. #32646
Comments
It works fine with TF 1.15.0.rc0. |
This also happens in 2.0.0.rc0. Instead of: |
Changing your imports can help resolve this issue. Tested in import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
model = Sequential([
Dense(24, input_dim=4, activation='relu'),
Dense(24, activation='relu'),
Dense(2, activation='linear')
])
model.compile(loss='mse', optimizer=Adam(lr=0.001))
x = np.array([[-0.08623559, -0.79897248, 0.03606475, 1.09068178]])
y = np.array([[ 1.0449973, -0.14471795]])
model.fit(x, y) output: Train on 1 samples
1/1 [==============================] - 0s 239ms/sample - loss: 0.5793
<tensorflow.python.keras.callbacks.History at 0x7fa54c4f6630> |
I have this problem ,too. my code works well in 2.0b1, not work in tf 2.0rc1 |
what is the difference between |
|
It works for me |
Worked for me!
|
System information
Describe the current behavior
Crash when fit. It works just fine in
1.14.0
,2.0.0b0
&2.0.0b1
.Describe the expected behavior
Not to crash when fit.
Code to reproduce the issue
Here is the colab link
Other info / logs
The text was updated successfully, but these errors were encountered: