Good morning,
In the process of obtaining the following loss, Expected object of type torch.cuda.FloatTensor but found type torch.cuda.LongTensor for argument # 3 'other error occurred.
So I tried to do type conversion in various ways such as N = N.float () or N = N.type (torch.cuda.FloatTensor), and this is one of the variables needed for an inplace operation error Occurs.
loss_l, loss_c: torch.cuda.FloatTensor
N: torch.cuda.LongTensor.
loss_l / = N
loss_c / = N
Can anybody help? Thank you in advance for your time.