Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Darknet() class: forward pass yolo case #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Simplify Darknet() class: forward pass yolo case #48

wants to merge 1 commit into from

Conversation

Anner-deJong
Copy link

You mentioned in your blog we can't concatenate the first yolo layer detections to an empty tensor, but I think we actually can. This simplifies your code a bit.
Also, not 100% sure so didnt delete this, but I think you can directly send x to predict_transform(), why would you send x.data instead?
And why is there the if type(x) == int: continue? predict_transform() will never return an int right?

last, why: outputs[i] = outputs[i-1]? This might be useful for future different use cases, but in the yolo architecture you no routing layer or shortcut layer will ever need to access the yolo predictions, so no need to keep them around in outputs dict.

You mentioned in your blog we can't concatenate the first yolo layer detections to an empty tensor, but I think we actually can. This simplifies your code a bit.
Also, not 100% sure so didnt delete this, but I think you can directly send x to predict_transform(), why would you send x.data instead?
And why is there the `if type(x) == int: continue`? predict_transform() will never return an int right?

last, why: `outputs[i] = outputs[i-1]`? This might be useful for future different use cases, but in the yolo architecture you no routing layer or shortcut layer will ever need to access the yolo predictions, so no need to keep them around in outputs dict.
XIA-Ziqi pushed a commit to XIA-Ziqi/pytorch-yolo-v3 that referenced this pull request Jul 28, 2019
made some bug fixing and added support for tiny Yolo-v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant