Optimization, Pytorch, Machine Learning, Deep Learning, Tensorboard.
Remove redundant host-to-GPU copies from the training step Once we have identified our first issue, fixing it is rather trivial. In the code block below, we copy our weight vector to the GPU a single time in the loss init function: class CrossEntropyLoss(nn.Module): def __init__(self):