import torch
from torchvision import models
model=models.inception_v3(pretrained=True)
model.fc=torch.nn.Linear(2048,16)
##input image size:299*299
Problem:
Traceback (most recent call last):
File “/home/lab326/songpeng/my_code/train.py”, line 545, in 
Loss, Accuracy=main()
File “/home/lab326/songpeng/my_code/train.py”, line 490, in main
train(train_loader, model, criterion, optimizer, epoch)
File “/home/lab326/songpeng/my_code/train.py”, line 165, in train
loss = criterion(y_pred, label)
File “/home/lab326/.local/lib/python3.5/site-packages/torch/nn/modules/module.py”, line 477, in call
result = self.forward(*input, **kwargs)
File “/home/lab326/.local/lib/python3.5/site-packages/torch/nn/modules/loss.py”, line 862, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File “/home/lab326/.local/lib/python3.5/site-packages/torch/nn/functional.py”, line 1550, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File “/home/lab326/.local/lib/python3.5/site-packages/torch/nn/functional.py”, line 975, in log_softmax
return input.log_softmax(dim)
AttributeError: ‘tuple’ object has no attribute ‘log_softmax’