Skip to content
Discussion options

You must be logged in to vote

You are passing a tensor object into a '.from_numpy()' function as it says in the video. The X and likely y variables contain a tensor. '.from_numpy()' needs a ndarray. As the error says.

If your code is exactly the same it can be due to incorrect order of jupyter cells, or running it twice.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Sarthak-Singh04
Comment options

@Sarthak-Singh04
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants