Pycharm 超出内存报错RuntimeError: DefaultCPUAllocator: not enough memory
RuntimeError: [enforce fail at ..\c10\core\CPUAllocator.cpp:75] data.DefaultCPUAllocator: not enough memory: you tried to allocate 311500800 bytes. Buy new RAM!跑一些比较大的模型的时候,Pycharm经常会报这样的错误,我们可以设置一下Py
·
RuntimeError: [enforce fail at ..\c10\core\CPUAllocator.cpp:75] data.
DefaultCPUAllocator: not enough memory: you tried to allocate 311500800 bytes. Buy new RAM!
跑一些比较大的模型的时候,Pycharm经常会报这样的错误,我们可以设置一下Pycharm默认的最大内存:
在Pycharm按下快捷键:Ctrl+Shift+A
然后输入:VM options
直接Enter
-Xms128m
-Xmx6020m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
改变-Xmx
(这里是Pycharm默认的最大值)
改变后重启Pycharm
更多推荐
已为社区贡献1条内容
所有评论(0)