Message Boards Message Boards

0
|
3504 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Display accuracy, validation, and loss for each epoch using NetTrain?

Posted 6 years ago

New to Mathematica 11.2 and NetTrain. Anyway, I was wondering, how does one generate the running accuracy, loss, and validation for each training example or epoch or batch when using NetTrain? BTW, I have mainly been using Keras with Tensorflow backend where one can simply do the following:

classifier.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])
classifier.fit(X_train, y_train, batch_size = 10, epochs = 100)

From reading and experimenting, one can use the following function to generate data for each example when your MaxBatchSize :

TrainingProgressReporting -> {"Print","Interval"->Quantity[1,"Batches"]}

However, this displays everything except for the 'accuracy' during the actual training. Also, the 'Panel' option, the default, also shows everything but the 'accuracy' and there's no legend to make heads or tail about the graph which is being displayed. Then this plot and all the data disappears from the screen when training is complete. It seems that this functionality doesn't exist out of the box but does within MXNet and one needs to build a custom function using the following function to get this level of functionality:

TrainingProgressReporting->Function[...]

Just wondering about the current state of NetTrain functionality within Mathematica 11.2.

POSTED BY: Conrad Taylor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract