Ali_Mashoud:

but accuracy of 697% doesn’t this makes my neural net overfit the data-set?


You cannot read off from this value (which must be wrong, because the accuracy has an upper bound of 1) anything about overfitting. Please reread my last post and feel free to visit the references in there.



 Ali_Mashoud:

Please identify if there is any error in this code? Thanks


Could you please provide this print-statement in another form? So instead of an f-string (I am unfamiliar with them), could you please write it in this way:
print('Random float between 0 and 1: {:.2f}'.format(torch.rand(1).item())

When you write {:.2f}, Python will only print the first two decimal places.
And just to make sure: What are the shapes of X_train, Y_train and y_pred? So when you do
print('Shapes of training samples, predictions and labels: {} {} {}'.format(X_train.shape, y_pred.shape, y_train.shape))

what is the output?