Optimization, Pytorch, Machine Learning, Deep Learning, Tensorboard.
weighted_nll function. As before, we can use torch.profiler.record_function to identify the problematic line of code as the assert call. def weighted_nll(pred, target, weight): with torch.profiler.record_function('assert'): assert target.max() < num_classes with