![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bug
pursuit_zhangyu
人工智障
展开
-
ubuntu16.04下pycharm中无法使用中文输入法
具体表现为在ubuntu系统下可以使用搜狗输入法,但是在pycharm无法使用解决方法打开pycharm.sh,我的地址在/opt/pycharm-community-2018.2.4/bin/pycharm.sh打开这个文件,翻到最后如下CLASSPATH="$IDE_HOME/lib/bootstrap.jar"CLASSPATH="$CLASSPATH:$IDE...转载 2019-07-09 17:34:29 · 2141 阅读 · 0 评论 -
pytorch出现RuntimeError: CUDA out of memory.
无论batch-size设置多小也是会出现这个问题的,我的原因是我将pytorch升级到了1.0.1,然后出现了这个问题RuntimeError: CUDA out of memory. Tried to allocate 823.88 MiB (GPU 0; 7.93 GiB total capacity; 6.96 GiB already allocated; 189.31 MiB fr...原创 2019-03-21 16:09:02 · 121613 阅读 · 64 评论 -
RuntimeError: expected a Variable argument, but got torch.FloatTensor
从字面的意思来看是RuntimeError:期望有一个变量参数,但是得到了torch.FloatTensor这个解决方法是升级pytorch的版本就可以了,我之前用的是pytorch0.3,现在升级了就不会出现这个问题了。出现问题的代码import torchfrom torch import nnm = nn.AdaptiveMaxPool2d(1)input = t...原创 2019-03-19 16:42:23 · 1413 阅读 · 1 评论 -
解决ssh链接服务器长时间不操作出现掉线问题
因为没有修改服务器的权限,所以只能够在自己的客户端进行修改了linux下键入sudo gedit /etc/ssh/ssh_config直接在后面添加ServerAliveInterval 20ServerAliveCountMax 999SeverAliveInterval 20即每隔20秒,向服务器发出一次心跳。SeverAliveCountMax 999若超过99...转载 2019-02-28 15:58:48 · 1271 阅读 · 0 评论 -
AttributeError: 'module' object has no attribute 'main'
首选说一下我的环境吧,ubuntu16.04,anaconda3,里面有两个虚拟环境一个是python3.5(名字叫tensorflow),一个是python2.7,出现了pip可以在python3.5这个环境中可以安装,然而在python2.7这个环境中就不可以安装,出现标题的错误。首先可以看一下两个环境下pip version使用的命令是pip -Vpython3.5...原创 2019-01-08 14:53:39 · 1778 阅读 · 1 评论 -
激活anaconda的环境出现source: no such file or directory: activate
直接打开terminal然后键入source /etc/profile激活一下就可以了原创 2018-12-28 14:49:01 · 9283 阅读 · 3 评论 -
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 24: invalid start byte
使用python中的函数open打开.txt文件的时候出现这个问题具体解决方法是将.txt文件的编码方式改成UTF-8就行了。首先打开文件,然后选中文件中的另存为,然后修改一下编码方式。如图 ...原创 2018-07-26 11:19:39 · 2804 阅读 · 0 评论 -
tensorflow.python.framework.errors_impl.InternalError: Failed to create session.
简介首先说一下我出现的情况,使用gpu运行跑模型的时候。出现标题的情况。然后查看nvidia-smi中进程的使用情况的时候,出现一个python进程正在运行,所以导致无法failed to create session。具体如下解决办法当然是关闭这个进程了,参考了百度的:https://jingyan.baidu.com/article/48206aea81b886216ad6b3e5.html打...原创 2018-06-05 15:59:52 · 24984 阅读 · 4 评论 -
Failed to find any matching files for /tmp/resnet_v1_50.ckpt
直接说我的原因吧,地址不对,将/tmp/resnet_v1_50.ckpt中最前面的/去了,就行了可以做一个测试import ospath = '/tmp/resnet_v1_50.ckpt'if os.path.exists(path): print('exists')else: print('not exists')输出not exists将path最前面的/去除,就可...原创 2018-05-14 16:28:07 · 3129 阅读 · 5 评论