Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre.delaunay committed May 31, 2024
1 parent dbc211d commit 0f23900
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion benchmarks/torchvision/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ def iobench(args):
if args.data is None and data_directory:
args.data = os.path.join(data_directory, "FakeImageNet")

loader = dataloader(args)
device = accelerator.fetch_device(0)
model = getattr(tvmodels, args.model)()
model.to(device)

loader = dataloader(args, model)
dtype = float_dtype(args.precision)

for _ in range(args.epochs):
Expand Down

0 comments on commit 0f23900

Please sign in to comment.