odingdongo / pytorch_classification Goto Github PK
View Code? Open in Web Editor NEW基于pytorch框架的classification万用模板
基于pytorch框架的classification万用模板
首先非常感谢你提供的代码,我在运行程序时发生如下错误,这个错误是训练到最后才会出现.
不知道怎么解决,期待你的回答.
Traceback (most recent call last):
File "", line 1, in
runfile('/home/xjtubaidu/xjtubaidu/train_baidu_xjtu.py', wdir='/home/xjtubaidu/xjtubaidu')
File "/home/zz/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "/home/zz/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/xjtubaidu/xjtubaidu/train_baidu_xjtu.py", line 83, in
val_inter=400
TypeError: 'NoneType' object is not iterable
这个问题已经解决, 取掉train的返回值即可!
Traceback (most recent call last):
File "/home/sky/work/soft/PycharmProjects/untitled1/BD_XJTU/predict/pred_BDXJTU.py", line 59, in
model.load_state_dict(torch.load(resume))
File "/home/sky/work/environment/python/anaconda/envs/baidu_match/lib/python2.7/site-packages/torch/nn/modules/module.py", line 522, in load_state_dict
.format(name))
KeyError: 'unexpected key "base_model.0.weight" in state_dict'
在预测阶段报的错误,查找了下,这个是模型加载的一个错误,有点迷茫,调试也不太了解原因是什么?有没有大佬跑过的?
分类问题直接最后一层用的fc层输出作为classifier的结果,没有加任何激活函数,这样可以拟合吗?
你好,我从铝型材表面瑕疵识别比赛的介绍文章看到了你的git。去年的雪浪制造AI挑战赛上你们小组获得了第一名,我对你们当时使用的方案很好奇,不知道能否分享下当时决赛路演时介绍的方案PPT,想学习下你们提出的mra net 结构,谢谢!
单GPU模式,运行总是出错,out of memory。
看样子大佬用了多块高性能GPU。
最后不得不用CPU,但慢的受不了
大佬, 请问一下, 我这个错误是怎么回事啊, 我才刚刚接触pytorch, 很多问题 不懂 , 求指教.
line 83 in train_baidu_xjtu.py and line 41 in train_util.py.
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
ForkingPickler(file, protocol).dump(obj)
BrokenPipeError: [Errno 32] Broken pipe
你好,我想请教一下您为什么会根据网络结构调整输入图片大小啊?有没有具体一点的原理想学习一下。
The code in data_aug.py Row 692:
img_path = '/media/gserver/data/FashionAI/round2/train/Images/coat_length_labels/0b6b4a2146fc8616a19fcf2026d61d50.jpg'
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCGeneral.cpp line=70 error=38 : no CUDA-capable device is detected
Traceback (most recent call last):
File "/home/es/PycharmProjects/untitled1/baidu/train_baidu_xjtu.py", line 67, in
model = model.cuda()
File "/home/es/sky/environment/python/anaconda3/envs/pytorch_test/lib/python3.6/site-packages/torch/nn/modules/module.py", line 249, in cuda
return self._apply(lambda t: t.cuda(device))
File "/home/es/sky/environment/python/anaconda3/envs/pytorch_test/lib/python3.6/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/es/sky/environment/python/anaconda3/envs/pytorch_test/lib/python3.6/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/home/es/sky/environment/python/anaconda3/envs/pytorch_test/lib/python3.6/site-packages/torch/nn/modules/module.py", line 249, in
return self._apply(lambda t: t.cuda(device))
RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCGeneral.cpp:70
求大佬带。是安装了cuda8.0,看这个错误好像是无法调用cuda。
请问数据集有扩增吗?看代码的话,只是单纯的对图片做了变化。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.