AttributeError: 'GoogLeNetOutputs' object has no attribute 'log_softmax'

I used web(https://github.com/dusty-nv/jetson-inference/blob/master/docs/pytorch-collect.md) and train.py(https://github.com/dusty-nv/pytorch-classification/blob/5107de352cade326e7aacd44bf8d625b7055fd4e/train.py) to train googlenet network . I changed pretrained=False in train.py on the picture.

It is an error line:
Traceback (most recent call last):
File “train.py”, line 514, in
main()
File “train.py”, line 135, in main
main_worker(args.gpu, ngpus_per_node, args)
File “train.py”, line 285, in main_worker
train(train_loader, model, criterion, optimizer, epoch, num_classes, args)
File “train.py”, line 339, in train
loss = criterion(output, target)
File “/home/bmw/.local/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 722, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/bmw/.local/lib/python3.6/site-packages/torch/nn/modules/loss.py”, line 948, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File “/home/bmw/.local/lib/python3.6/site-packages/torch/nn/functional.py”, line 2422, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File “/home/bmw/.local/lib/python3.6/site-packages/torch/nn/functional.py”, line 1591, in log_softmax
ret = input.log_softmax(dim)
AttributeError: ‘GoogLeNetOutputs’ object has no attribute ‘log_softmax’

How can I solve its problem?

GoogLeNetOutputs is a Python namedtuple and you’d want the logits attribute from it.