Created
December 30, 2020 11:23
-
-
Save bh1995/184d756de85ebf929981c0c8b34acc53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n_channels = 3 | |
n_classes = 2 | |
# Next creat an instance of the UNet model | |
modelUnet = UNet().to(device) | |
criterion = torch.nn.BCEWithLogitsLoss() | |
# Now define the optimizer | |
optimizerUnet = optim.Adam(modelUnet.parameters(), lr = 0.00001, weight_decay=0) | |
# And finally lets train the model | |
# train(modelUnet, optimizerUnet, focal_loss, 500, dataloader2, print_status=True) | |
model_out = train(modelUnet, optimizerUnet, criterion, 200, dataloader2, print_status=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment