
深度学习
JACOBWHY
这个作者很懒,什么都没留下…
展开
-
attributeerror:module ‘torch.cuda’ has no attribute ‘reset_peak_memory_stats’
报错信息:attributeerror:module ‘torch.cuda’ has no attribute ‘reset_peak_memory_stats’应该又是版本不适配的问题。因为用的是RTX3090显卡,只支持CUDA11.0版本及以上。解决方法:在终端中输入以下命令重新安装pytorchPip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pyto原创 2021-11-25 19:48:38 · 2163 阅读 · 0 评论 -
your cuda software stack is old.we fall back to the NIVIDIA driver for some compilation. Update your
报错信息:your cuda software stack is old.we fall back to the NIVIDIA driver for some compilation. Update your CUDA version to get the best performance. The ptxas error was: ptxas fatal: Value ‘sm_86’ is not defined for option ‘gpu-name’这是警告不是报错。这个warning的意思是:原创 2021-11-25 19:43:13 · 1930 阅读 · 1 评论 -
AttibuteError: module ‘tensorflow’ has no attribute ‘get_default_graph’.
在终端中输入 python train.py 运行 train.py 文件。出现报错:AttibuteError: module ‘tensorflow’ has no attribute ‘get_default_graph’.该报错的意思是:tensorflow模块没有get_default_graph属性。这是由于Keras API(https://keras.io/)有多个实现,包括原始和参考实现(https://github.com/keras-team/keras),还有各种其他实现,包括原创 2021-11-25 19:41:06 · 2103 阅读 · 0 评论 -
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
在终端中运行深度学习代码时出现报错信息:ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory环境:显卡RTX3090 + python3.6.13 + tensorflow-gpu1.13.2通常是由于版本不匹配造成的。因为显卡为RTX3090,只支持CUDA11.0及以上的版本。因此从下图中发现 tensorflow-gpu在2.4.0以上的版本满足条件。图片来源:在 Wi原创 2021-11-25 19:29:34 · 329 阅读 · 0 评论 -
python: can’t open file ‘train.py’ : [Errno 2] No such file or directory
在终端中输入python train.py 运行训练的python文件,出现报错:python: can’t open file ‘train.py’ : [Errno 2] No such file or directory其实是一个特别简单的错误。方法有:通过cd移动到包含该文件的上一级文件,路径中间用**/**隔开。选中包含该文件的上一级文件,右键在终端中打开,并激活进入所需的虚拟环境。再输入python train.py即可正常运行该文件。...原创 2021-11-25 19:00:32 · 13848 阅读 · 5 评论 -
conda新建虚拟环境
如果在一台电脑上,想开发多个不同的项目,可能需要用到同一个包的不同版本。如果在同一个目录下安装或者更新,新版本会覆盖以前的旧版本,其他的项目就无法运行了。解决方案:虚拟环境作用:可以搭建独立的python 运行环境,使得单个项目的运行环境与其他项目互不影响。创建环境在Anaconda中创建一个名为my_env的,指定python版本为3.6的虚拟环境conda create --name my_env python=3.6或conda create -n my_env python=3.原创 2021-11-25 17:15:59 · 919 阅读 · 0 评论 -
ValueError: could not broadcast input array from shape(708,1016,3) into shape(1016,708,3)
在终端中打开model文件夹。输入sh 1.sh,运行1.sh文件。出现报错信息:ValueError: could not broadcast input array from shape(708,1016,3) into shape(1016,708,3)感觉像是把图片的宽高输入弄反了。找到原始训练的数据集,发现视频图片的大小确实是1016708像素的。归一化后应为112112。但发现此时有几个视频的大小跟其他视频不一样,可能是当时复制数据集的时候产生了一些错误。把数据集替换成原始的数据集,则可以原创 2021-11-25 09:41:30 · 591 阅读 · 0 评论 -
报错:Error occurred when finallizing generatorDataset iterator.
在终端中输入python train.py,在anaconda创建的虚拟环境中运行深度学习代码时,出现报错信息:Error occurred when finallizing generatorDataset iterator: Failed precondition: Python interpreter state is not initialized.The process may be terminated.在该行报错的上方显示:Epoch 00065: early stopping.早停其原创 2021-11-25 09:35:28 · 1301 阅读 · 1 评论