-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add mixin class and inherit it in torchplate.experiment.Experiment
#2
Comments
Bumping this to include a simple test loop for a classification model next update. Should be of the form: def test(self, model, testloader, weights):
# if weights is not None..., load weights
acc = tp_metrics.Accuracy()
tqdm_loader = tqdm(testloader)
for batch in tqdm_loader:
x, y = batch
logits = model(x)
acc.update(logits, y)
tqdm_loader.set_description(f'Accuracy: {acc.get()}')
final_acc = acc.get()
print(f'Accuracy: {final_acc}')
acc.reset()
return final_acc can even include a separate version that uses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add a bunch of experiment utility functions in a mixin class to be inherited in
torchplate.experiment.Experiment
(and therefore also inherited in subclasses oftorchplate.experiment.Experiment
). Example methods to include:test_model_accuracy
for classification experimentsThe text was updated successfully, but these errors were encountered: