I have used FCN ResNet50 model for semantic segmentation of document images. I've been trying to resolve this issue but so far have not been able to find success. This is the link for the model on google colab: https://colab.research.google.com/drive/1slJilG1ZBOsk6AqM6AOUaaCxHFSXVMCM?usp=sharing
This is the error:
TypeError: Traceback (most recent call last)
<ipython-input-12-f6d0f244c03c> in <module>()
13
14 model_ft = train_model(final_model, train_dl, criterion, optimizer_ft, exp_lr_scheduler,
---> 15 num_epochs=25)
<ipython-input-11-683ce68860de> in train_model(model, dataloaders, criterion, optimizer, scheduler, num_epochs)
31 with torch.set_grad_enabled(phase == 'train'):
32 outputs, aux = model(inputs.float())
---> 33 _, preds = torch.max(outputs, 1)
34 loss = criterion(outputs, labels)
35
TypeError: max() received an invalid combination of arguments - got (str, int), but expected one of:
* (Tensor input)
* (Tensor input, Tensor other, *, Tensor out)
* (Tensor input, int dim, bool keepdim, *, tuple of Tensors out)
* (Tensor input, name dim, bool keepdim, *, tuple of Tensors out)