ksuit.callbacks.default_callbacks.param_count

Classes

ParamCountCallback

Callback to log the number of trainable and frozen parameters of the model.

Module Contents

class ksuit.callbacks.default_callbacks.param_count.ParamCountCallback(trainer, model, data_container, tracker, log_writer, checkpoint_writer, metric_property_provider, name=None)

Bases: ksuit.callbacks.base.callback_base.CallbackBase

Callback to log the number of trainable and frozen parameters of the model.

Parameters:
  • trainer (ksuit.trainers.BaseTrainer) – Trainer of the current run, subclass of SgdTrainer.

  • model (ksuit.models.ModelBase) – Model of the current run.

  • data_container (ksuit.utils.data.data_container.DataContainer) – DataContainer instance that provides access to all datasets.

  • tracker (ksuit.trackers.BaseTracker) – Tracker instance to log metrics to stdout/disk/online platform.

  • log_writer (ksuit.writers.LogWriter) – LogWriter instance to log metrics to stdout/disk/online platform.

  • metric_property_provider (ksuit.providers.metric_property_provider.MetricPropertyProvider) – MetricPropertyProvider instance to access properties of metrics.

  • name (str | None) – Name of the callback.

  • checkpoint_writer (ksuit.writers.CheckpointWriter)