GithubHelp home page GithubHelp logo

iaicourse's People

Contributors

bettermorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

iaicourse's Issues

【TST在windows10上运行错误】RuntimeError: CUDA out of memory.

系统环境及依赖包

os : Windows-10-10.0.19042-SP0
python : 3.8.12
tsai : 0.2.24
fastai : 2.5.3
fastcore : 1.3.27
torch : 1.10.1
n_cpus : 8
device : cuda (NVIDIA GeForce MX150)

使用TST模型训练时会出现以下错误

RuntimeError: CUDA out of memory. Tried to allocate 764.00 MiB (GPU 0; 2.00 GiB total capacity; 841.93 MiB already allocated; 277.44 MiB free; 854.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

原因及解决方法如下

  1. 减小模型训练的batch_size
  2. kill 占用GPU内存的进程
  3. 增加语句,清除缓存
  • 设置 max_split_size_mb
    设置环境变量PYTORCH_CUDA_ALLOC_CONF为max_split_size_mb:128

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.