I want use the GoogLeNet model but something wrong

I have two questions :
first:what’s the different between googlenet.py and inception.py if I want to use GoogLeNet model which is the suitable.

second:



I want konw if i want to get the output’s size which function is right. when i use the vgg model the shape is ok.
thanks so much

As you can see, GoogleNetOutputs is a namedtuple, not a tensor.

GoogLeNet returns a named tuple and thus behave differently than VGG. See source

GoogLeNetOutputs = namedtuple('GoogLeNetOutputs', ['logits', 'aux_logits2', 'aux_logits1'])

Try

output = net(x)
output_logits = output.logits
print(output_logits.shape)

Thank you for your code it is OK. could you answer my first question .thanks again

Thank you so much:grinning:

googlenet.py: GoogLeNet aka Inception v1
inception.py: Inception v3

For more info:

import torchvision
help(torchvision.models.googlenet)
help(torchvision.models.inception_v3)