We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code:
dataloader = DataLoader(dataset, batch_size=self.batch_size, shuffle=True, drop_last=True, num_workers=dataloader_workers) with trange(train_epochs + test_epochs, disable=not verbose) as t: for epoch in t: for i, data in enumerate(dataloader): optim.zero_grad() generated_data = self.forward() mmd = self.criterion(generated_data, data) if not epoch % 200 and i == 0: t.set_postfix(idx=idx, loss=mmd.item()) mmd.backward() optim.step() if epoch >= test_epochs: self.score.add_(mmd.data) return self.score.cpu().numpy() / test_epochs
Should change if epoch >= test_epochs: to if epoch >= train_epochs: to calculate the average score of the test set.
if epoch >= test_epochs:
if epoch >= train_epochs:
The text was updated successfully, but these errors were encountered:
Hello ! Yes indeed, I'll change this asap.
Sorry, something went wrong.
No branches or pull requests
Code:
Should change
if epoch >= test_epochs:
toif epoch >= train_epochs:
to calculate the average score of the test set.The text was updated successfully, but these errors were encountered: