我认为对于 GPU 内存较低的 PyTorch 用户来说,这是一个非常普遍的信息:
RuntimeError: CUDA out of memory. Tried to allocate MiB (GPU ; GiB total capacity; GiB already allocated; MiB free; cached)
Run Code Online (Sandbox Code Playgroud)
我想为我的课程研究对象检测算法。许多深度学习架构需要大容量的 GPU 内存,所以我的机器无法训练这些模型。我尝试通过将每一层加载到 GPU 然后将其加载回来来处理图像:
RuntimeError: CUDA out of memory. Tried to allocate MiB (GPU ; GiB total capacity; GiB already allocated; MiB free; cached)
Run Code Online (Sandbox Code Playgroud)
但它似乎不是很有效。我想知道在使用很少的 GPU 内存的同时训练大型深度学习模型是否有任何提示和技巧。提前致谢!
编辑:我是深度学习的初学者。如果这是一个愚蠢的问题,请道歉:)
我想将我的 Ubuntu 从 19.04 升级到 20.04,但在更新所有软件包之前这是不可能的。
\n\n\xe2\x9d\xaf sudo do-release-upgrade\nChecking for a new Ubuntu release\nYour Ubuntu release is not supported anymore.\nFor upgrade information, please visit:\nhttp://www.ubuntu.com/releaseendoflife\n\nPlease install all available updates for your release before upgrading.\nRun Code Online (Sandbox Code Playgroud)\n\n所以,我正在尝试更新我的软件包:
\n\n\xe2\x9d\xaf sudo apt update\nGet:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48 InRelease\nIgn:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48 InRelease\nGet:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48 Release [574 B]\nGet:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48 Release [574 B]\nHit:3 http://repo.yandex.ru/yandex-disk/deb stable InRelease \nHit:5 http://linux.teamviewer.com/deb stable InRelease \nHit:6 http://old-releases.ubuntu.com/ubuntu disco InRelease \nHit:7 http://ppa.launchpad.net/gophers/archive/ubuntu disco InRelease \nHit:8 http://old-releases.ubuntu.com/ubuntu disco-updates InRelease \nHit:9 http://dl.google.com/linux/chrome/deb stable InRelease \nHit:10 https://dl.yarnpkg.com/debian stable InRelease …Run Code Online (Sandbox Code Playgroud) 我正在开发一个使用异步 SQLAlchemy 连接asyncpg到 PostgreSQL 数据库的项目。问题是这样的:当我与数据库建立太多连接时,它会引发以下异常:
asyncpg.exceptions.TooManyConnectionsError: sorry, too many clients already
Run Code Online (Sandbox Code Playgroud)
这基本上是 Postgres 本身和配置的限制。但遗憾的是,会话无法处理此问题,例如尝试多次连接。是否有任何解决方法可以使其无异常地工作?
这是设置:
asyncpg.exceptions.TooManyConnectionsError: sorry, too many clients already
Run Code Online (Sandbox Code Playgroud) apt ×1
asyncpg ×1
exception ×1
low-memory ×1
nvidia ×1
postgresql ×1
python ×1
pytorch ×1
sqlalchemy ×1
ubuntu ×1
upgrade ×1