Giter VIP home page Giter VIP logo

Comments (4)

mave5 avatar mave5 commented on July 25, 2024

Is this for chapter 6: Single-Object Segmentation?
I cannot recall the "out of memory message" for Chapter 6 since the model and data are pretty light.
At what stage did you get the error?

from pytorch-computer-vision-cookbook.

praveenr2998 avatar praveenr2998 commented on July 25, 2024

Yes 6th chapter. While training as i have 6GB CUDA goes out of memory after 26 epochs, then i used kaggle kernel they have 15GB and CUDA went out of memory after 72 epochs.

from pytorch-computer-vision-cookbook.

mave5 avatar mave5 commented on July 25, 2024

My guess is that the error is due these two lines

    pred= torch.sigmoid(output)
    _, metric_b=dice_loss(pred, target)

inside loss_batch helper function. They calculate the dice metric during training.

Can you try one of these two options:

  • comment out the two lines and return a fixed number for metric_b for now to see if that is causing the error
  • put the two lines under with torch.no_grad(): to avoid tracking gradients when calculating the metric.

from pytorch-computer-vision-cookbook.

praveenr2998 avatar praveenr2998 commented on July 25, 2024

Thank you,
i used "with torch.no_grad():" and it works perfectly.
Thank you very much.

from pytorch-computer-vision-cookbook.

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.