报错信息
Golden-sun
这个作者很懒,什么都没留下…
展开
-
挂载硬盘问题:mount: wrong fs type, bad option, bad superblock on /dev/sdb,
mount: wrong fs type, bad option, bad superblock on /dev/sdb,missing codepage or helper program, or other error解决方案:# create mount dirsudo mkdir /hdd6T# new file systemsudo mkfs.ext4 /dev/sdc# mount drivesudo mount /dev/sdc /hdd6T/# change owner原创 2020-12-14 15:20:15 · 12287 阅读 · 4 评论 -
Pytorch RNN 循环网络中 RuntimeError: Trying to backward through the graph a second time
model = RNN()hn = torch.zeros(1,seq_len,hidden_num)epochs = 250clip_value = 100loss = nn.CrossEntropyLoss()optimizer = torch.optim.Adam(model.parameters(),lr=0.001)for epoch in range(epochs): accu,num = 0.0,0 for x,y in data_collect(corpus_i原创 2020-11-22 15:08:41 · 682 阅读 · 1 评论 -
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace o
问题RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [4]] is at version 1; expected version 0 instead分析nn.relu(True) # 这个引起的问题原来的变量被替换掉了,所以梯度回传的时候 找不到之前的变量了解决办法nn.re原创 2020-10-06 15:01:43 · 266 阅读 · 0 评论 -
sambd ERROR: job for smbd.service failed
sudo service smbd restart出现如下问题解决方案sudo cp /usr/share/samba/smb.conf /etc/sambs这样就可以重新启动了原创 2020-09-22 19:54:09 · 667 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘torch.utils.serialization‘
这是因为在torch新版本中删除了load_lua解决办法:首先命令行运行pip install torchfile安装torchfile,然后将utils.py第7行中的from torch.utils.serialization import load_lua改为import torchfile,最后将utils.py第90行中的load_lua改为torchfile.load...原创 2020-09-15 09:44:27 · 5965 阅读 · 2 评论 -
Pytorch RuntimeERROR: Given groups=1 weights of size [256,64,1,1] expected input[1,16,256,256] to
错误Pytorch RuntimeERROR: Given groups=1 weights of size [256,64,1,1] expected input[1,16,256,256] to have 64 channels, but got 16 channels instead.错误分析Given groups=1 weights of size [256,64,1,1] 代表卷积核的channel 大小为 64->256 ,大小为1*1expected input [1原创 2020-09-12 14:32:49 · 54333 阅读 · 39 评论 -
Pytorch 报错: The size of tensor a (4) must match the size of tensor b (3) at non-singleton
原因分析1.读取的是.png 图片 是32位深度的,一般我们读取的是.jpg 24位深度的2.转换为RGB就行了test_image = Image.open(test_image_name).convert('RGB')原创 2020-09-10 20:06:12 · 7024 阅读 · 0 评论 -
关于“xxx”object is not callable的异常
所谓callable对象是指一个后边可以加()的对象,比如函数,所以这种异常肯定是某对象多加了(),比如:把一个变量用了函数名来命名,结果再调这个函数的时候就会报这个异常image.size()就会出现这样的错误这个时候把括号删除就行了...原创 2020-09-06 20:02:19 · 3571 阅读 · 1 评论 -
ERROR: Cannot uninstall ‘PyYAML‘. 安装 fvcore
直接安装 pip install fvcore会出现错误解决办法先这样安装pip install --ignore-installed PyYAML然后安装pip install fvcore原创 2020-09-06 10:30:25 · 795 阅读 · 0 评论 -
python3.6安装dlib,一直不成功的解决办法
使用pip install dlib 不行建议用pip install dlib==19.6.1 一下子成功了原创 2020-09-04 15:21:15 · 4330 阅读 · 3 评论 -
bash --config command not found 报错
原因是.sh脚本在windows系统下用记事本文件编写的。不同系统的编码格式引起的。1、确保用户对文件有读写及执行权限 oracle@linux-106:~/RMAN/bin> chmod a+x test.sh2、然后修改文件格式(1)使用vi工具 oracle@linux-106:~/RMAN/bin> vi test.sh(2)利用如下命令查看文件格式 :set ff 或 :set fileformat 可以看到如下信息 fileformat=dos 或 f..原创 2020-08-21 19:56:17 · 1724 阅读 · 0 评论 -
运行shell脚本报错:“syntax error near unexpected token fi 的解决方法
用vim打开文件,在命令行模式下输入:set ff发现出来的是dosfileformat=dos现在通过命令:set ff=unix设置我们的代码模式set ff = unix然后保存代码再次查看发现代码编程了unix原创 2020-08-20 12:11:45 · 995 阅读 · 0 评论 -
win10 使用ssh连接服务器 ‘’Bad owner or permissions on C:\\Users\\Administrator/.ssh/config‘’
这个时候只需要把这个文件夹中的config 文件删除就行了因为可能在vscode 中使用config文件导致的不兼容,只需要把config文件删除就行了原创 2020-08-16 11:21:01 · 1280 阅读 · 1 评论 -
Python报错:PermissionError: [Errno 13] Permission denied 解决方案详解
出现错误的原因:1.文件找不到,2.文件被占用,3.文件无权限访问,4.打开的不是文件,而是一个目录,我就是这个问题,打开的是一个目录原创 2020-06-30 12:57:47 · 3993 阅读 · 0 评论 -
NameError: name 'long' is not defined
是因为高版本Python3.x中没有long类型,只有int类型。Python2.x中既有long 类型又有int 类型。所以只需要把long()改为int 就行原创 2019-09-13 09:11:42 · 6886 阅读 · 0 评论