-
-
Save mdfarragher/5487bbc974dca26d9503681dd4488f98 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
// create the batch to train on | |
var trainingBatch = StyleTransfer.CreateBatch(lossFunction, labels); | |
// train the model | |
Console.WriteLine("Training the model..."); | |
var numEpochs = 300; | |
for (int i = 0; i < numEpochs; i++) | |
{ | |
trainer.TrainMinibatch(trainingBatch, true, NetUtil.CurrentDevice); | |
if (i % 50 == 0) | |
Console.WriteLine($"epoch {i}, training loss = {trainer.PreviousMinibatchLossAverage()}"); | |
} | |
// the rest of the code goes here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment