Skip to content

Why is my test accuracy so low even though Daniel's so so high? #861

Discussion options

You must be logged in to vote

Nevermind, I resolved it. The problem was in the accuracy function - typo in y_pred:

Corrected version:

def accuracy_fn(y_true,y_pred):
   correct = torch.eq(y_true,y_pred).sum().item()
  acc = (correct/(len(y_pred)))*100
  return acc

Thanks for the help!

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@GodRishUniverse
Comment options

@Yer-Marti
Comment options

@GodRishUniverse
Comment options

@GodRishUniverse
Comment options

Answer selected by GodRishUniverse
@Yer-Marti
Comment options

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