【发布时间】:2019-04-27 19:32:43
【问题描述】:
同时尝试通过更改最后一个 fc 层来为我自己的数据集微调 inception_V3,例如
last_layer =nn.Linear(n_inputs, len(classes))
inception_v3.fc = last_layer
之后,当我训练它时,它在这个位置上出现了这个错误
# on training loop
output = inception_v3(data)
# calculate the batch loss
loss = criterion(output, target)
错误是
AttributeError: 'tuple' object has no attribute 'log_softmax'
【问题讨论】:
标签: python deep-learning pytorch