Hi ,
I have got another error saying
AttributeError: 'InceptionOutputs' object has no attribute 'size'
In incpetion_v3 pretrained model. I am using focal loss which works well on other models. focal loss code is here
def focal_loss(targets,logits,eps,l):
ce_loss = torch.nn.functional.binary_cross_entropy_with_logits(logits, targets, reduction= 'none')
pt = torch.exp(-ce_loss)
loss = (eps * (1-pt)**l * ce_loss).mean()
return loss
Please need help. It throws error on ce_loss statement