You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run the command:
python imagenet.py --gpus 0 --arch resnet50 --job_dir ./experiment --data_path image_dir --pretrained_model pretrained_model/resnet50.pth --pr_target 0.5 --N 4 --conv_type BlockL1Conv --train_batch_size 256 --eval_batch_size 256 --rearrange --num_epochs 2 --export_onnx
the output in terminal shows:
==> Preparing data..
==> Conv Type: BlockL1Conv
==> BN Type: LearnedBatchNorm
Traceback (most recent call last):
/1xN/imagenet.py", line 455, in
main()
/1xN/imagenet.py", line 292, in main
model, pr_cfg = get_model(args)
^^^^^^^^^^^^^^^
/1xN/imagenet.py", line 238, in get_model
ckpt = torch.load(args.pretrained_model, map_location=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1028, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1231, in legacy_load
return legacy_load(f)
^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1158, in legacy_load
tensor = torch.tensor([], dtype=storage.dtype).set(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Attempted to set the storage of a tensor on device "cpu" to a storage on different device "cuda:0". This is no longer allowed; the devices must match.
set data to cifar10:
Is there any complete example command for setting dataset to cifar10?
The text was updated successfully, but these errors were encountered:
Run resnet50:
when i run the command:
python imagenet.py --gpus 0 --arch resnet50 --job_dir ./experiment --data_path image_dir --pretrained_model pretrained_model/resnet50.pth --pr_target 0.5 --N 4 --conv_type BlockL1Conv --train_batch_size 256 --eval_batch_size 256 --rearrange --num_epochs 2 --export_onnx
the output in terminal shows:
==> Preparing data..
==> Conv Type: BlockL1Conv
==> BN Type: LearnedBatchNorm
Traceback (most recent call last):
/1xN/imagenet.py", line 455, in
main()
/1xN/imagenet.py", line 292, in main
model, pr_cfg = get_model(args)
^^^^^^^^^^^^^^^
/1xN/imagenet.py", line 238, in get_model
ckpt = torch.load(args.pretrained_model, map_location=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1028, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1231, in legacy_load
return legacy_load(f)
^^^^^^^^^^^^^^
/anaconda3/envs/new_torch/lib/python3.11/site-packages/torch/serialization.py", line 1158, in legacy_load
tensor = torch.tensor([], dtype=storage.dtype).set(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Attempted to set the storage of a tensor on device "cpu" to a storage on different device "cuda:0". This is no longer allowed; the devices must match.
set data to cifar10:
Is there any complete example command for setting dataset to cifar10?
The text was updated successfully, but these errors were encountered: