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: Failed to convert a NumPy array to a Tensor (Unsupported object type int). #4

Open
21Vinay opened this issue Nov 28, 2021 · 2 comments

Comments

@21Vinay
Copy link

21Vinay commented Nov 28, 2021

while running line number 65

history = model.fit(X_train, Y_train, epochs = 40,validation_split=0.2, verbose = 1)

it showing the following error : -

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type int).

Please help !

@sajidkhan2067
Copy link

I am also getting the same problem. Have you got any solution yet?

@saeidjam
Copy link

X_train = np.asarray(X_train).astype(np.float32)
Y_train = np.asarray(Y_train).astype(np.float32)
history = model.fit(X_train, Y_train, epochs = 40,validation_split=0.2, verbose = 1)

it will work by this code

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