Code Monkey home page Code Monkey logo

Comments (3)

JiahangWu avatar JiahangWu commented on June 7, 2024 1

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

from semantic-aware-scene-recognition.

DGideas avatar DGideas commented on June 7, 2024

@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.

from semantic-aware-scene-recognition.

JiahangWu avatar JiahangWu commented on June 7, 2024

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)

from semantic-aware-scene-recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.