Skip to content

Commit

Permalink
Merge pull request #34 from Separius/patch-2
Browse files Browse the repository at this point in the history
update imagenet.py to be compatible with homura
  • Loading branch information
moskomule authored Apr 12, 2019
2 parents fe20493 + 6ccdbcc commit e1e3620
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imagenet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
from homura import optim, lr_scheduler
from homura.utils import callbacks, reporter
from homura.utils.trainer import SupervisedTrainer, DistributedSupervisedTrainer
from homura.utils import callbacks, reporters
from homura.trainers import SupervisedTrainer, DistributedSupervisedTrainer
from homura.vision.data import imagenet_loaders
from torch.nn import functional as F

Expand All @@ -15,8 +15,8 @@ def main():
scheduler = lr_scheduler.MultiStepLR([50, 70])

c = [callbacks.AccuracyCallback(), callbacks.LossCallback()]
r = reporter.TQDMReporter(range(args.epochs), callbacks=c)
tb = reporter.TensorboardReporter(c)
r = reporters.TQDMReporter(range(args.epochs), callbacks=c)
tb = reporters.TensorboardReporter(c)
rep = callbacks.CallbackList(r, tb, callbacks.WeightSave("checkpoints"))

if args.distributed:
Expand Down

0 comments on commit e1e3620

Please sign in to comment.