Pytorch, Deep Learning, Optimization, Tensorboard, Deep Dives.
torchvision.models.resnet18(weights='IMAGENET1K_V1').cuda(device) criterion = torch.nn.CrossEntropyLoss().cuda(device) optimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9) model.train() # train step def train(data): inputs, labels = data[0].to(device=device, non_blocking=True), \