i have runtime error with linear regression function #300
Answered
by
nazarPuriy
Abdusattor20030610
asked this question in
Q&A
-
in first linear regression function there is error in loss=loss_fn(y_pred,y_train) |error says The size of tensor a (10) must match the size of tensor b (40) at non-singleton dimension 0 |
Beta Was this translation helpful? Give feedback.
Answered by
nazarPuriy
Feb 14, 2023
Replies: 1 comment 1 reply
-
That means that the dimension is not the same, you have 2 arrays with different length. Probably you are predicting on test and then trying to match it with the train or something like that. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mrdbourke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That means that the dimension is not the same, you have 2 arrays with different length. Probably you are predicting on test and then trying to match it with the train or something like that.