Code Monkey home page Code Monkey logo

Comments (4)

tovacinni avatar tovacinni commented on June 14, 2024

Something you may want to try is seeing if you can delete some variables as soon as they are done being used to clear up memory early. We unfortunately didn't try to run this with low-memory GPUs, so the optimizations in terms of memory are likely sub-optimal. In a future version (when I have more time), I can try to optimize the memory usage more.

from gscnn.

sainatarajan avatar sainatarajan commented on June 14, 2024

Thank you for your reply. The model looks very complicated to play around with. It will be difficult to revert back any changes I make. If you could help me do this, it would be of great help. However, I have only 50 images for training and I think Google Colab should be able to handle this small load with 12 GB of GPU memory. Even I tried with 64*64 resolution and still it failed.

from gscnn.

shubhaminnani avatar shubhaminnani commented on June 14, 2024

try reducing crop size. number of images has nothing to do with model. it just take small time to train if images are less. try using 16gb gpu it works on 16gb gpu.

from gscnn.

sainatarajan avatar sainatarajan commented on June 14, 2024

@shubhaminnani Thank you. I had set the crop size to 360, the training went further ahead and stopped at this error. Can you tell me why? Here is the stack trace:

Traceback (most recent call last):
  File "train.py", line 383, in <module>
    main()
  File "train.py", line 154, in main
    train(train_loader, net, criterion, optim, epoch, writer)
  File "train.py", line 233, in train
    main_loss = net(inputs, gts=mask)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/gdrive/My Drive/gscnn/network/gscnn.py", line 327, in forward
    return self.criterion((seg_out, edge_out), gts)              
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/gdrive/My Drive/gscnn/loss.py", line 161, in forward
    return self.nll_loss(F.log_softmax(inputs), targets)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 1314, in log_softmax
    dim = _get_softmax_dim('log_softmax', input.dim(), _stacklevel)
AttributeError: 'tuple' object has no attribute 'dim'

from gscnn.

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.