![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
错误警告
程序员阿德
这个作者很懒,什么都没留下…
展开
-
libcuda.so: file not recognized: File truncated 解决办法
file not recognized: File truncated原创 2023-02-14 11:37:37 · 849 阅读 · 0 评论 -
RuntimeError: CUDA error: an illegal memory access was encountered
使用pytorch进行文字识别时出现标题上的错误。1、在训练前添加如下语句:torch.backends.cudnn.benchmark = True没用2、将 batch_size 从 64 改为 32。没用3、在训练前添加如下语句:torch.cuda.set_device(id)我只有一个显卡,所以id=0,解析查看:https://di...原创 2019-04-19 20:03:05 · 18205 阅读 · 4 评论 -
训练模型时损失函数为nan
参考如下:https://oldpan.me/archives/careful-train-loss-nan-infhttps://blog.csdn.net/qq_38906523/article/details/81357895https://blog.csdn.net/u013732444/article/details/73344628https://blog.csdn.n...原创 2019-03-05 19:07:13 · 3335 阅读 · 0 评论 -
使用机器学习框架TuriCreate出现的错误
跑这个教程的代码如何用Python和深度神经网络寻找近似图片?,使用机器学习框架TuriCreate时出现了一些错误,这里记录一下。1、导入库import turicreate as tc 的时候出现报错:ImportError: libblas.so.3: cannot open shared object file: No such file or directo...原创 2019-03-01 18:09:26 · 1867 阅读 · 0 评论 -
RuntimeError: CUDA error: all CUDA-capable devices are busy or unavailable
在使用pytorch构建网络时, 执行model.cuda()时, 出现标题上的错误, 还会报如下错误 :RuntimeError: cuda runtime error (30) : unknown error at /opt/conda/conda-bld/pytorch_1544199946412/work/aten/src/THC/THCGeneral.cpp:51 目前网...原创 2019-01-29 16:22:36 · 11396 阅读 · 6 评论 -
AttributeError: Can't get attribute 'Net' on module '__main__'
在使用pytorch加载模型时报错:torch.save(old_model, PATH)new_model = torch.load(PATH)AttributeError: Can't get attribute 'Net' on <module '__main__'> 解决办法:1、将类的定义添加到加载模型的这个py文件中,这个方法有点。。。2、使用官...原创 2019-01-31 13:07:37 · 32840 阅读 · 14 评论 -
supervisorctl start wsgi 报错:wsgi: ERROR (no such file)
这是我的配置文件:/etc/supervisor/conf.d/wsgi.conf[program:wsgi]command=gunicorn -w 4 -b 0.0.0.0:8000 wsgi:appdirectory=/home/ejior/Documents/flask/demo1 ; 项目的文件夹路径startsecs=...原创 2019-01-10 11:20:26 · 2809 阅读 · 0 评论 -
flask url_for 图片URL 缺少端口号
参考:https://q.cnblogs.com/q/103812/Flask中关于url_for()的坑:https://blog.csdn.net/yannanxiu/article/details/52287870 需要flask返回服务器上静态文件的url地址:return url_for('static', _external=True, filename='image...原创 2019-01-15 18:27:39 · 867 阅读 · 0 评论 -
flask 404 not found
我用post请求方法,地址为 http://172.168.10.48:88/img_seg/,使用 postman 工具发送请求,得到的结果为:404 Not FoundThe requested URL was not found on the server. If you entered the URL manually please check your spelling and ...原创 2019-01-15 15:13:50 · 4217 阅读 · 0 评论 -
flask error:TypeError: 'list' object is not callable
参考:https://www.polarxiong.com/archives/Flask%E8%AE%BE%E7%BD%AE%E8%BF%94%E5%9B%9Ejson%E6%A0%BC%E5%BC%8F.html 我在flask程序的view函数中返回一个元素为字典的列表list,然后在网页调试工具 postman 中显示的错误为:500 Internal Server Error...原创 2019-01-15 11:59:00 · 1439 阅读 · 0 评论 -
pytorch loss = loss_func(output, label) 报错
在运行损失函数时 loss = loss_func(output, label) 时报了两个错 :1.RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'target'这是因为label必须是 LongTensor 类型, 之前是 :lab...原创 2019-01-25 11:42:55 · 6414 阅读 · 1 评论 -
gunicorn.errors.HaltServer: HaltServer 'App failed to load.' 4
在安装gunicorn时,执行下面的代码出现错误:from flask import Flaskapp = Flask(__name__)@app.route('/')def index(): # return 'hello world'if __name__ == '__main__': app.run(debug=True)使用命令:gunicorn w...原创 2019-01-09 16:02:08 · 4396 阅读 · 0 评论 -
The kernel appears to have died. It will restart automatically.
参考:https://github.com/tensorflow/tensorflow/issues/9829出现这个错误的原因有很多,我这里只分享我遇到的这个错误原因。 在Jupyter中运行如下代码,报 kernel died 的错误。# 加载模型new_model = load_model('./saved_models/my_model.h5')def test_r...原创 2019-01-14 16:34:28 · 12386 阅读 · 0 评论 -
502 bad Gateway & supervisorctl status : EXITED
我使用 postman 发送get请求,提示502的错误。 在服务器上使用 supervisorctl status 查看该进程状态,显示为 EXITED, 在参考文章中得知该状态表示:PROCESS_STATE_EXITED 进程状态由正在运行转换为退出 应该是代码本身的问题,检查后发现,我在两个模块之间相互导入了。 还有一个方法,找到该服务程序在 /e...原创 2019-01-17 18:23:26 · 1363 阅读 · 0 评论 -
Nginx出现500 Internal Server Error 错误
参考: Nginx出现500 Internal Server Error 错误的解决方案 原因1:我要实现接收图片并保存在项目的 static/images/ 目录下,我在代码有这两句:file_path = os.path.join('./static/images', filename)upload_file.save(file_path)但是我没有在 static/...原创 2019-01-11 16:49:17 · 1060 阅读 · 0 评论 -
supervisord ERROR : Error: File contains no section headers.
执行命令 supervisord -c /etc/supervisord.conf 时,报错:Error: File contains no section headers.file: '/etc/supervisor/conf.d/imgweb.conf', line: 1';/etc/supervisor/conf.d/imgweb.conf\n'For help, use /ho...原创 2019-01-11 15:55:49 · 4550 阅读 · 0 评论 -
运行gunicorn失败:[ERROR] Connection in use: ('0.0.0.0', 8000)
参考:https://pdf-lib.org/Home/Details/5262 执行命令:gunicorn -w 4 -b 0.0.0.0:8000 wsgi:app,遇到如下错误:[2019-01-10 17:17:13 +0800] [31665] [INFO] Starting gunicorn 19.9.0[2019-01-10 17:17:13 +0800] [3166...原创 2019-01-10 17:25:31 · 7283 阅读 · 0 评论