Comments (2)
Hi, this code in repo is implemented by <pytorch 1.0, so some code in old version pytorch(such as pytorch 0.4) have been deprecated, you should change your code by using pytorch 1.0
From point 1-3 you're right, but for point 4 is not exactly right, you should change as below:
original:
images = Variable(images,volatile=True)
change to:
with torch.no_grad():
images = Variable(image)
Only this can you change directly, for ' images.detach()', after you define you variable and feed into your network, and then you don't want to optimize the variable while backward, so you need to detach this variable, and it will happen on evaluation not train, like this way:
#use it during the evaluation
output = model(input)
image = Variable(images)
image.detach()
In conclusion, after you change all code(upon all is just UserWarning, not error), you should run your network fluently, but if you can not get your expected result, please double check you dataloader or hyperparameter, thanks.
from pytorch-yolo-v1.
after torch0.4, volatile=true was deprecated, you should try 'with torch.no_grad()', or just reduce your batch_size, but it's just not use best of your memory
from pytorch-yolo-v1.
Related Issues (20)
- eval error HOT 6
- about grid_num=14 HOT 2
- 您能提供一下预训练好的模型文件吗,谢谢! HOT 2
- 你的resnet50作为backbone时,输入(3,448,448)的图片,输出维度不是(7,7,30)! HOT 7
- yoloLoss的组成部分中contain_loss的可疑之处 HOT 1
- predict.py中的nms是对所有类别一起做nms吗?
- 执行eval_voc,Expected 4-dimensional input for 4-dimensional weight 64 3 7 7, but got 3-dimensional input of size [3, 448, 448] instead
- 这里操作是不是有问题? HOT 6
- predict.py error HOT 2
- Can't find the listfile.txt HOT 4
- About BatchNormalization HOT 1
- 损失函数的参数好像有点问题 HOT 4
- ImportError: cannot import name 'queue' from 'torch._six' (/home/liqi/.local/lib/python3.8/site-packages/torch/_six.py) HOT 5
- loss变化图片
- ValueError: Input must be >= 2-d. HOT 3
- 训练了 5 个epoch , pred bbox 的x2 竟然小于 x1 HOT 6
- best.pth
- IndexError: invalid index of a 0-dim tensor
- some pictures in annotation txt(voc2007.txt+ voc2012.txt) are not in the image folder(2007trainval + 2012trainval)
- 请问为什么要代码中加入了sigmoid? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-yolo-v1.