AttributeError: 'tuple' object has no attribute 'log_softmax'
This is a well known problem.
Try one the following solutions:
disable aux_logits when the model is created here by also passing
aux_logits=False
to the inception_v3 function.edit your train function to accept and unpack the returned tuple to be something like:
output, aux = model(input_var)
Check the following link for more info.
This problem seams to me like instead you define F
:
import torch.nn.functional as F
You in accident have set F
to some tuple
F=(1,2)
And then when you call F.log_softmax
you get exactly this error.