August 2019
Intermediate to advanced
242 pages
5h 45m
English
We'll choose 10 epochs for this example so that the code can be trained in less than an hour. It should be noted that 10 epochs will only get us to around 20% accuracy, so do not be alarmed if you find the resulting model does not appear accurate; you will need to train it for much longer, maybe even around 1,000 epochs. On a modern computer, an epoch takes around three minutes to complete; for the sake of not requiring three days to complete this example, we've chosen to abbreviate the training process and will leave it as an exercise to assess the results of more epochs, as shown here:
var ( epochs = flag.Int("epochs", 10, "Number of epochs to train for") dataset = flag.String("dataset", "train", "Which dataset to ...Read now
Unlock full access