Closed JiahangWu closed 4 years ago
@Lollipop9z If you're use Windows, please consider switching to Ubuntu.
Some strange error with pickle often occur when your OS environment is inconsistent with the author's recommand operation system.
But I still have other error on the Ubuntu with the GPU. This error told me that there is no memory of the GPU, but it still have. Please, help me. ^&^
Traceback (most recent call last):
File "evaluation.py", line 300, in <module>
val_top1, val_top2, val_top5, val_loss, val_ClassTPDic = evaluationDataLoader(val_loader, model, set='Validation')
File "evaluation.py", line 76, in evaluationDataLoader
outputSceneLabel, feature_conv, outputSceneLabelRGB, outputSceneLabelSEM = model(RGB_image, semanticTensor)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/lollipop/Semantic-Aware-Scene-Recognition/SASceneNet.py", line 165, in forward
e1 = self.encoder1(x)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torchvision/models/resnet.py", line 41, in forward
out = self.conv1(x)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 320, in forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDA out of memory. Tried to allocate 338.50 MiB (GPU 0; 5.79 GiB total capacity; 3.59 GiB already allocated; 340.94 MiB free; 307.46 MiB cached)
But I still have other error on the Ubuntu with the GPU. This error told me that there is no memory of the GPU, but it still have. Please, help me. ^&^
Traceback (most recent call last): File "evaluation.py", line 300, in <module> val_top1, val_top2, val_top5, val_loss, val_ClassTPDic = evaluationDataLoader(val_loader, model, set='Validation') File "evaluation.py", line 76, in evaluationDataLoader outputSceneLabel, feature_conv, outputSceneLabelRGB, outputSceneLabelSEM = model(RGB_image, semanticTensor) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/home/lollipop/Semantic-Aware-Scene-Recognition/SASceneNet.py", line 165, in forward e1 = self.encoder1(x) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward input = module(input) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torchvision/models/resnet.py", line 41, in forward out = self.conv1(x) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/home/lollipop/anaconda3/envs/SA-Scene-Recognition/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 320, in forward self.padding, self.dilation, self.groups) RuntimeError: CUDA out of memory. Tried to allocate 338.50 MiB (GPU 0; 5.79 GiB total capacity; 3.59 GiB already allocated; 340.94 MiB free; 307.46 MiB cached)
The solution is that modify the batch_size being smaller, such as 2, 4, 6, in the config file. For example:
/Config/config_MITIndoor.yaml
VALIDATION:
PRINT_FREQ: 10
BATCH_SIZE:
TRAIN: 100
TEST: 2
Hi, I downloaded all the available Model Zoo, and ran the evaluation.py. However, there are some bugs in my project. Please, give me some suggestions and solutions. Thanks.
The error is following: