Skip to content

Commit

Permalink
Avoid unecessary compat break btw train script and nearby timm versio…
Browse files Browse the repository at this point in the history
…ns w/ dtype addition.
  • Loading branch information
rwightman committed Jan 9, 2025
1 parent deb9895 commit eeee38e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def main():
distributed=args.distributed,
collate_fn=collate_fn,
pin_memory=args.pin_mem,
img_dtype=model_dtype,
img_dtype=model_dtype or torch.float32,
device=device,
use_prefetcher=args.prefetcher,
use_multi_epochs_loader=args.use_multi_epochs_loader,
Expand All @@ -769,7 +769,7 @@ def main():
distributed=args.distributed,
crop_pct=data_config['crop_pct'],
pin_memory=args.pin_mem,
img_dtype=model_dtype,
img_dtype=model_dtype or torch.float32,
device=device,
use_prefetcher=args.prefetcher,
)
Expand Down
2 changes: 1 addition & 1 deletion validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def validate(args):
crop_border_pixels=args.crop_border_pixels,
pin_memory=args.pin_mem,
device=device,
img_dtype=model_dtype,
img_dtype=model_dtype or torch.float32,
tf_preprocessing=args.tf_preprocessing,
)

Expand Down

0 comments on commit eeee38e

Please sign in to comment.