-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Question on [shortcut] shape calculation #6955
Comments
Maybe not a bug, you can look here #4662 for more explanations. |
Look it allows distinct shapes among input layers. I guess the they follow the rules. Please tell me if it is correct or not.
So let's assume
Is it true that for the first |
I'm not sure, @AlexeyAB can you explain this? |
After reading the actual implementation, I can confirm my guess is somewhat correct. Let me describe the working flow so others can see why. The output shape is direct copy of shape of immediate previous layer. It ensures every The region consists of two levels of loops. The outer computes per shortcut output component, while the inner aggregates corresponding components from each Hope this helps who want to understand about |
@jerry73204 @lsd1994 @eagledot I need a little bit example. if the immediate previous feature map is (26,26,256) and the from feature map is ( 26,26, 128) is it possible [shortcut ] layer to perform its operation? I was thinking [shortcut] only done if the two tesnors have exact shape for all c,h,w. |
I read the actual implementation of [shortcut]. Look like it supports multilayer shortcut in the configuration, but I found something alarming to me.
If I understanding it correctly. The [shortcut] section has a
from
option, which are extra input layer indexes separated by comma apart from the previous layer (code). It never checks if one of the indexes happens to be the previous layer, nor checks if any of them are duplicated.[shortcut] performs addition on
from
layers plus the previous layer. I expect the shapes (h, w, c) are equal among input layers. During the parsing phase, it checks the heights and widths, but does not panics but simply print error message if channels mismatch (code). In the training phase, it checks all of h, w, c matches only if there is singlefrom
layer (code), it also does not check channels in shape calculation (code). I find nowhere the about channels on multi-layerfrom
case.It looks weird to me. If the parsing code prints channels mismatch as an error, why channels are never verified against with each other? Maybe for some reason or I'm missing something. Interestingly, the example config files in
cfg
directory always shortcuts up to single layer. Hence, the multi-layer code are never touched in runtime.Please point out if anything is missing here, or we can file a bug. Thanks.
The text was updated successfully, but these errors were encountered: