Программа для обучения обучению inception_v3 в pytorch, которую я использую, находится здесь: https://drive.google.com/file/d/1zn4z7nOp_wJne0En6zq4WJfwHVVftERT/view?usp=sharing
Я получаю следующую ошибку при запуске программы:
Epoch 0/24
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-20-cc88ea5f8bd3> in <module>()
1 model_ft = train_model(model_ft, criterion, optimizer_ft, exp_lr_scheduler,
----> 2 num_epochs=25)
<ipython-input-17-812cf3c4576a> in train_model(model, criterion, optimizer, scheduler, num_epochs)
33 outputs = model(inputs)
34 print(outputs)
---> 35 _, preds = torch.max(outputs, 1)
36 loss = criterion(outputs, labels)
37
TypeError: max() received an invalid combination of arguments - got (tuple, int), but expected one of:
* (Tensor input)
* (Tensor input, Tensor other, Tensor out)
* (Tensor input, int dim, bool keepdim, tuple of Tensors out)
Как это можно исправить?
Спасибо