This also happened to me when I initialized the criterion. For example,
criterion = torch.nn.BCELoss()
I solve this problem by:
criterion = torch.nn.BCELoss
This also happened to me when I initialized the criterion. For example,
criterion = torch.nn.BCELoss()
I solve this problem by:
criterion = torch.nn.BCELoss