Optimization, Pytorch, Machine Learning, Deep Learning, Tensorboard.
torch.Tensor([0.1]*num_classes).cuda() with torch.profiler.record_function('weighted_nll'): loss = weighted_nll(pred, target, weights) return loss The addition of the labels help us identify the weight definition, or more accurately, the copying of the weights into the GPU, as the problematic line