run python test.py --dataset Synapse --vit_name R50-ViT-B_16 error
when I run "python test.py --dataset Synapse --vit_name R50-ViT-B_16"
but ,let me said, it raises below error :
"Traceback (most recent call last):
File "test.py", line 122, in
when I run "python test.py --dataset Synapse --vit_name R50-ViT-B_16"
but ,let me said, it raises below error :
"Traceback (most recent call last): File "test.py", line 122, in net.load_state_dict(torch.load(snapshot)) File "D:\Anaconda3\envs\dlgpuevn\lib\site-packages\torch\serialization.py", line 571, in load with _open_file_like(f, 'rb') as opened_file: File "D:\Anaconda3\envs\dlgpuevn\lib\site-packages\torch\serialization.py", line 229, in _open_file_like return _open_file(name_or_buffer, mode) File "D:\Anaconda3\envs\dlgpuevn\lib\site-packages\torch\serialization.py", line 210, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: '../model/TU_Synapse224/TU_pretrain_R50-ViT-B_16_skip3_bs24_224\epoch_29.pth'"
Change the max_epochs, batch_size as you used when training.
Hey @yangkunpeng-coder were you able to resolve the above issue?
Change the max_epochs, batch_size as you used when training.
Hey,how much would you change to?
Change the max_epochs, batch_size as you used when training.
Hey,how much would you change to?
If you train the codes with batch_size as 32, max_epochs as 30, the change the arguments in test.py as batch_size = 32, max_epochs = 30.
How to test without model weights?