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

Expected object of scalar type Long but got scalar type Float for argument #2 'target' #38

Closed
amanpreets01 opened this issue Jan 8, 2019 · 2 comments

Comments

@amanpreets01
Copy link

I followed the concept given above ,
took the data,normalized ,split into train and test data and when training ,it says that it want type long but got float32

Any help would be appreciated

@jianlianggao
Copy link

You can try to add Variable().long()

@amanpreets01
Copy link
Author

I tried everything .It toggles between float and long
When I change the datatype to long it asks float and vice versa i.e. when float then expects long.

I found the solution by the way
I just converted the nominal features into one_hot_encode and it worked

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

2 participants