-
Notifications
You must be signed in to change notification settings - Fork 64
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
About coral-cnn model #16
Comments
It wouldn't really matter in this case whether you choose
or
or in general any number >= 4. In all cases all the values are averaged if the input to that layer is 4x4. It's been a while, but if I remember correctly, the reason why we have this particular avg pooling layer was that we were initially experimenting with larger input images also. But in the end we used 120x120 to make the comparison with the Niu et al 2016 paper more fair because that's what they used. |
You mean, all three choices get the same result? If it's the same, it's just a difference in parameter amounts. Right? |
Yeah. AvgPooling doesn't have any parameters. It's just averaging the pixels. |
Yes, but it affects the parameters of the full connection layer |
One of the full connection layers is 512 x 1 and the other is 4 x 512 |
Oh I see. That's because of the padding=2 then and you may be right that there are duplicated values. We probably did this because we were initially working with larger images. |
Well, so if the input here is 120 x 120, it should be changed to nn. AvgPool2d (4). There is no duplicate value in this, and the fully connected parameter becomes 512, which also reduces the amount of parameters and the amount of calculation。 |
i agree |
I think it's going to affect the training process and the results will be different. What do you think? |
yeah, i think it could make a small difference. I don't think it will substantially change anything because these are just some redundancies; and it probably will also affect all models equally. |
I got curious and am currently rerunning the experiments. Looks like speed is not affected (makes sense because of broadcasting in PyTorch/CUDA probably) but performance does seem to improve a bit. I will update things once I have all results. It may take a while though. |
You used nn.AvgPool2d(7, stride=1, padding=2) at the end of the cnn network, the network input is 120 x 120, the input of pooling layer is 4 x 4, then after the pooling layer to get the output size is 2 x 2, these 4 values are the same. What's the point of this design? Or I've miscalculated it.
The text was updated successfully, but these errors were encountered: