Skip to content

Commit

Permalink
Bugfix: meta_train_dataset etc. are attributes of benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhah committed Apr 10, 2020
1 parent 3c0ab81 commit f0783b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def main(args):
with open(args.model_path, 'wb') as f:
torch.save(benchmark.model.state_dict(), f)

if hasattr(meta_train_dataset, 'close'):
meta_train_dataset.close()
meta_val_dataset.close()
if hasattr(benchmark.meta_train_dataset, 'close'):
benchmark.meta_train_dataset.close()
benchmark.meta_val_dataset.close()


if __name__ == '__main__':
Expand Down

0 comments on commit f0783b5

Please sign in to comment.