mdabros / SharpLearning

Machine learning for C# .Net
MIT License
384 stars 85 forks source link

Monitoring training progress #154

Open SULVAL opened 6 months ago

SULVAL commented 6 months ago

Hi! Is it possible to monitor "epoch-by-epoch" the training progress of a given algorithm (neural nets, particularly)?

Thanks a lot in advance

mdabros commented 6 months ago

Hi @SULVAL,

Yes, most of the learners write some information via Trace.WriteLine. It is a bit simplistic. You can get the information written to a source by adding to trace listeners like this:


// Trace to console
Trace.Listeners.Add(new ConsoleTraceListener()));

// Trace to file.
var streamWriter = new StreamWriter("TrainingLog.txt");
Trace.Listeners.Add(new TextWriterTraceListener(streamWriter)));

Hope this helps.