Isr*_*ebe 6 python deep-learning pytorch
在尝试通过更改最后一个 fc 层来为我自己的数据集微调 inception_V3 时
last_layer =nn.Linear(n_inputs, len(classes))
inception_v3.fc = last_layer
Run Code Online (Sandbox Code Playgroud)
之后,当我训练时,它在这个位置上出现了这个错误
# on training loop
output = inception_v3(data)
# calculate the batch loss
loss = criterion(output, target)
Run Code Online (Sandbox Code Playgroud)
错误是
AttributeError: 'tuple' object has no attribute 'log_softmax'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
10381 次 |
最近记录: |