Problems and Solutions
文章平均质量分 53
44
蠕动的爬虫
一只小菜鸡
展开
-
[enforce fail at ..\caffe2\serialize\inline_container.cc:145
1 问题2 原因3 解决1 问题测试模型的时候遇到:RuntimeError: [enforce fail at ..\caffe2\serialize\inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory2 原因PytorchStreamReader无法读取zip存档:无效的标头或存档已损坏。加载的模型文件已经损坏了。3 解决.原创 2021-05-29 00:51:51 · 7387 阅读 · 4 评论 -
解决:RuntimeError: Tensor for ‘out‘ is on CPU, Tensor for argument #1 ‘self‘ is on CPU, but expected t
这里写目录标题一级目录二级目录三级目录一级目录RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)二级目录三级目录原创 2021-04-23 13:40:46 · 11611 阅读 · 3 评论 -
解决:W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library
1、问题2、原因3、解决1、问题环境:CUDA11.1+tensorflow2.4.1在测试tensorflow是否可以gpu时报错:W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found2、原因tensorflow没有加载到“cusolver6.原创 2021-04-14 22:18:01 · 42782 阅读 · 21 评论 -
GeForce RTX 3060 Laptop GPU with CUDA capability sm_86 is not compatible with the current PyTorch in
1、问题2、原因3、解决1、问题GeForce RTX 3060 Laptop GPU with CUDA capability sm_86 is not compatible with the current PyTorch installation.The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.If you want to use the.原创 2021-04-14 19:06:43 · 20146 阅读 · 26 评论 -
解决:RuntimeError: Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict: “ca.fc1
1. 问题2. 分析3. 解决1. 问题在修改完Resnet网络结构(加入attention机制)后进行train,报错:2. 分析 原因是预训练模型里面的参数模型和自己修改的网络参数不对应。 先看加载预训练模型的代码def _resnet(arch, block, layers, pretrained, progress, **kwargs): model = ResNet(block, lay.原创 2021-02-13 11:00:40 · 17587 阅读 · 9 评论 -
pycharm中更改terminal命令行的shell path
有的时候我们需要pycharm项目用命令行运行程序,默认的shell path是系统本地自带的如何将默认的shell path更改到anaconda的shell path呢?找到anaconda的Anaconda prompt,查看属性,在“目标”那里将cmd.exe以及后面的内容全部复制 2. 返回pycharm,进入setting在Tools那里找到terminal,可以看到当前的shell path是cmd.exe将第一步复制的内容替换掉当前shell pa原创 2021-02-10 22:36:21 · 8151 阅读 · 4 评论 -
Windows安装cpu版tensorflow
亲测j简单有效,适合python各种版本打开anaconda在需要安装TensorFlow的环境下输入下面命令:pip install --upgrade --ignore-installed tensorflow开始下载…查看是否安装成功,如果没报错就OK了import tensorflow as tf输出tensorflowd的版本print(tf.__version__)...原创 2021-01-22 00:28:29 · 208 阅读 · 0 评论 -
解决:RuntimeError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 2.00 GiB total capacity; 1
1. 问题2. 分析3. 解决1. 问题训练模型时报错:RuntimeError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 2.00 GiB total capacity; 1.49 GiB already allocated; 57.03 MiB free; 6.95 MiB cached)2. 分析这种问题,是GPU内存不够引起的3. 解决方法一: 换高性能高显存的显卡方法二:修改代码报错的训练代码为.原创 2021-01-31 12:11:09 · 67378 阅读 · 25 评论 -
解决:RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
1. 问题2. 分析3. 解决1. 问题import torch时报错:RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb2. 分析这是numpy版本与python版本不匹配的问题3. 解决卸载原来版本的numpypip uninstall numpy2.下载相匹配的numpy版本在https://www.lfd.uci.edu/~gohlke/python.原创 2021-01-30 22:42:39 · 7010 阅读 · 0 评论 -
解决:Failed to load the native TensorFlow runtime.
1. 问题2. 原因分析3. 解决1. 问题今天给一台电脑装tensorflow,当import tensorflow as tf时报以下错误Failed to load the native TensorFlow runtime2. 原因分析TensorFlow 1.6 及以后的官方版本都使用了 AVX 来编译,当前的CPU 不支持 AVX 指令集,所以加载不了。3. 解决方法1.:卸载原来的版本较高的tensorflow,换成1.6版本的tensorflow(一些tensorflo.原创 2021-01-30 16:29:01 · 13943 阅读 · 0 评论 -
安装PyMaxflow:解决ModuleNotFoundError: No module named ‘maxflow‘
第一次在CSDN发博客各位大佬,你们好,我是计算机领域的一个小白,在CSDN几年了跟各位大佬学到了很多专业知识,我也一定会坚持学习下去,并将学到的东西分享出来让更多的人学习。最近在弄graph cut的作业,遇到一些问题,所以记录一下。1、遇到的问题在import maxflow时出现了下面报错这是因为当前的环境缺少了相应的库,开始以为是安装maxflow库,结果还是报错,原因就是需要安装的其实是PyMaxflow而不是maxflow。一开始在anaconda直接安装,发现报错 error:原创 2021-01-04 20:40:08 · 2901 阅读 · 1 评论 -
解决:AttributeError: module ‘tensorflow._api.v2.train‘ has no attribute ‘string_input_producer‘
实验报错:Traceback (most recent call last): File "create_tf_record.py", line 319, in <module> batch_test(train_record_output,resize_height, resize_width) File "create_tf_record.py", line 274, in batch_test tf_image,tf_label = read_records(re原创 2021-01-25 23:37:58 · 33684 阅读 · 9 评论