Deep Learning, Pytorch, Fine Tuning, Computer Vision, Transfer Learning.
regularization requires a slightly different approach. L2 regularization implementation : # Define a loss function criterion = nn.CrossEntropyLoss() # L2 regularization optimizer = optim.SGD(model.parameters(), lr=0.01, weight_decay=0.01) L1 Regularization implementation : # Define a loss function