pretrained-models.pytorch icon indicating copy to clipboard operation
pretrained-models.pytorch copied to clipboard

InceptionResnetV2 comments

Open andrewgrahambrown opened this issue 7 years ago • 5 comments

Hi guys,

First thanks very much for the package! I found it very easy to use and am very grateful that you guys put in the effort to make this.

I was looking into the implementation of InceptionResnetv2 and comparing it to Google's description. I see 3 areas where I can't quite match up the code to the online description, and I wondered what you thought about them. The 3 issues are annotated on this image:

inceptionresnetv2_notes

  1. Branch (1) in block 8 is three 2d convolutions rather than two. I suspect this was on purpose given the kernel sizing of the second two convolutions [(1,3) then (3,1)] but I wanted to check.

  2. I cannot find the dropout layer at the end of the network between avgpool_1a and last_linear

  3. I cannot see the extra branch that comes out of the middle of the network (between repeat/sequential/Block17 and mixed_7a in your implementation). I also guess this was on purpose, is this intended for the user to implement?

Thanks for your help!

EDIT: I see that 1) has a direct analogy in the TensorFlow repo . 3) is, I think relevant to the "create_aux_logits" check in the TF repo.

andrewgrahambrown avatar Jun 14 '18 09:06 andrewgrahambrown

Hi @andrewgrahambrown,

Thanks for submitting this issue :)

  1. Sorry I did not understand your issue. Could you please point out the concerned line from this repo and the tensorflow repo? thanks

  2. It seems that I forgot the dropout at the end.

  3. You are right, I did not port it. I never tried to finetune this network btw, so I don't know if this branch is useful or not.

Cadene avatar Jun 14 '18 23:06 Cadene

  1. The issue is that the lines 214/215 in inceptionresnetv2.py do not match Google's blog post description of InceptionResnetV2. However, on further inspection, lines 214/215 do match lines 92-95 in the TF implementation of inception_resnet_v2.py and also match Fig. 13 in the related publication. So I have to suspect that it is Google's blog post that has a small error, not the code.

  2. Happy to help there then!

  3. I'm also not sure. I would suspect it causes a small difference if only because it is optional in the TF implementation.

andrewgrahambrown avatar Jun 15 '18 07:06 andrewgrahambrown

  1. Feel free to submit a pull request ;)

  2. Yeah this branch could be helpful for fine tuning as well. However I am not sure if I could find the time to add it tho. Why do you need it?

Cadene avatar Jun 15 '18 18:06 Cadene

Make a fork with the dropout layer

On 15 June 2018 at 20:08, Remi [email protected] wrote:

Feel free to submit a pull request ;) 2.

Yeah I would expect it helps training with this branch. I am not sure if could find the time to add it tho. Why do you need it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Cadene/pretrained-models.pytorch/issues/73#issuecomment-397700617, or mute the thread https://github.com/notifications/unsubscribe-auth/AKe_bk3Xe1kPu96Jb1illovVLZdRv9m9ks5t8_gNgaJpZM4UnpSZ .

andrewgrahambrown avatar Jun 17 '18 14:06 andrewgrahambrown

is there a fork with the dropout layer?

muzammilaz avatar Sep 16 '18 12:09 muzammilaz