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
I have a problem with the test step. The environment is Google Colab. I tried changing num_workers to 0, but it didn't solve the problem. How should I solve this problem? Thank you! !python /content/University1652-Baseline/test.py --name ft_ResNet50 --test_dir /content/University-Release/test --batchsize 32 --which_epoch 119 We use the scale: 1 -------test----------- /usr/local/lib/python3.11/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( /usr/local/lib/python3.11/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or Nonefor 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passingweights=ResNet50_Weights.IMAGENET1K_V1. You can also use weights=ResNet50_Weights.DEFAULTto get the most up-to-date weights. warnings.warn(msg) Load the model from ./model/ft_ResNet50/net_119.pth 1 -> 3: 32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 608 640 672 701 32 Traceback (most recent call last): File "/content/University1652-Baseline/test.py", line 249, in <module> gallery_feature = extract_feature(model,dataloaders[gallery_name], which_gallery) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/University1652-Baseline/test.py", line 181, in extract_feature ff += outputs ^^ UnboundLocalError: cannot access local variable 'outputs' where it is not associated with a value
The text was updated successfully, but these errors were encountered:
I have a problem with the test step. The environment is Google Colab. I tried changing num_workers to 0, but it didn't solve the problem. How should I solve this problem? Thank you!
!python /content/University1652-Baseline/test.py --name ft_ResNet50 --test_dir /content/University-Release/test --batchsize 32 --which_epoch 119
We use the scale: 1 -------test----------- /usr/local/lib/python3.11/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( /usr/local/lib/python3.11/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or
Nonefor 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing
weights=ResNet50_Weights.IMAGENET1K_V1. You can also use
weights=ResNet50_Weights.DEFAULTto get the most up-to-date weights. warnings.warn(msg) Load the model from ./model/ft_ResNet50/net_119.pth 1 -> 3: 32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 608 640 672 701 32 Traceback (most recent call last): File "/content/University1652-Baseline/test.py", line 249, in <module> gallery_feature = extract_feature(model,dataloaders[gallery_name], which_gallery) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/University1652-Baseline/test.py", line 181, in extract_feature ff += outputs ^^ UnboundLocalError: cannot access local variable 'outputs' where it is not associated with a value
The text was updated successfully, but these errors were encountered: