TensorBoardTrainingContext
Models & Types · AiDotNet.Logging
Context manager for training runs with automatic TensorBoard logging.
Implements: IDisposable
Constructors
| Constructor | Summary |
|---|---|
TensorBoardTrainingContext(string experimentName, string runName, Dictionary<string, object> hparams) |
Creates a new training context. |
Properties
| Property | Summary |
|---|---|
SummaryWriter Writer { get; } |
Gets the underlying SummaryWriter. |
TimeSpan Elapsed { get; } |
Gets elapsed time since context creation. |
long GlobalStep { get; set; } |
Gets or sets the current global step. |
Methods
| Method | Summary |
|---|---|
void Dispose() |
Releases resources. |
void LogElapsedTime() |
Logs elapsed time. |
void LogModelWeights(Dictionary<string, float[]> weights, Dictionary<string, float[]> gradients) |
Logs model weights at current step. |
void LogTrainStep(float loss, float? accuracy, float? lr) |
Logs a training step with automatic step incrementing. |
void LogValStep(float loss, float? accuracy) |
Logs a validation step (does not increment global step). |