Skip to content

Conversation

@ekagra-ranjan
Copy link
Contributor

@ekagra-ranjan ekagra-ranjan commented Jan 19, 2019

The update allows inceptionV3 to process images larger or smaller than prescribed image size (299x299). Will be useful while finetuning or testing on different resolution images.

The update allows inceptionV3 to process images larger or smaller than prescribed image size (299x299).
@codecov-io
Copy link

codecov-io commented Jan 19, 2019

Codecov Report

Merging #718 into master will increase coverage by 0.61%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #718      +/-   ##
==========================================
+ Coverage   38.99%   39.61%   +0.61%     
==========================================
  Files          29       29              
  Lines        2721     2724       +3     
  Branches      411      430      +19     
==========================================
+ Hits         1061     1079      +18     
+ Misses       1579     1571       -8     
+ Partials       81       74       -7
Impacted Files Coverage Δ
torchvision/models/inception.py 14.28% <0%> (-0.21%) ⬇️
torchvision/transforms/transforms.py 79.48% <0%> (+0.7%) ⬆️
torchvision/datasets/voc.py 20.38% <0%> (+1.94%) ⬆️
torchvision/datasets/lsun.py 19.6% <0%> (+1.96%) ⬆️
torchvision/datasets/cifar.py 33.66% <0%> (+1.98%) ⬆️
torchvision/transforms/functional.py 70.47% <0%> (+2.22%) ⬆️
torchvision/datasets/folder.py 68.23% <0%> (+2.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98ca260...1bd2b13. Read the comment docs.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I have a few comments, but I'd be willing to merge the PR if you address those.

# 8 x 8 x 2048
x = F.avg_pool2d(x, kernel_size=8)
adaptiveAvgPoolWidth = x.shape[2]
x = F.avg_pool2d(x, kernel_size=adaptiveAvgPoolWidth)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it simpler to just use F.adaptive_avg_pool2d(x, 1) here?

Copy link
Contributor Author

@ekagra-ranjan ekagra-ranjan Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adaptive avg pool wasn't working in my local implementation due to pytorch version incompatibility, as you would be knowing from the issue (#696), so I implemented a workaround around it. From your above question it seems that that the latest pytorch release has the Adaptive avg pool so your suggestion is indeed a better implementation. Should I make this change in my PR?

Copy link
Contributor Author

@ekagra-ranjan ekagra-ranjan Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at the new PR (#744 (comment)).

# 5 x 5 x 128
x = self.conv1(x)
adaptiveAvgPoolWidth = x.shape[2]
x = F.avg_pool2d(x, kernel_size=adaptiveAvgPoolWidth)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, isn't it simpler to just use the adaptive version?

@fmassa
Copy link
Member

fmassa commented Feb 14, 2019

superseeded by #744

@fmassa fmassa closed this Feb 14, 2019
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.

3 participants