classifier¶
Classifier Context.
Classes
|
-
class
ashpy.contexts.classifier.ClassifierContext(classifier_model=None, loss=None, dataset=None, metrics=None, log_eval_mode=<LogEvalMode.TEST: 0>, global_step=<tf.Variable 'global_step:0' shape=() dtype=int64, numpy=0>, ckpt=None)[source]¶ Bases:
ashpy.contexts.base_context.BaseContextashpy.ClassifierContextprovide the standard functions to test a classifier.-
__init__(classifier_model=None, loss=None, dataset=None, metrics=None, log_eval_mode=<LogEvalMode.TEST: 0>, global_step=<tf.Variable 'global_step:0' shape=() dtype=int64, numpy=0>, ckpt=None)[source]¶ Instantiate the
ashpy.contexts.classifier.ClassifierContextcontext.- Parameters
classifier_model (
tf.keras.Model) – Atf.keras.Modelmodel.loss (
ashpy.losses.Executor) – Loss function, format f(y_true, y_pred).dataset (
tf.data.Dataset) – The test dataset.metrics (
listof [ashpy.metrics.metric.Metric]) – List ofashpy.metrics.metric.Metricwith which to measure training and validation data performances.log_eval_mode (
ashpy.modes.LogEvalMode) – Models’ mode to use when evaluating and logging.global_step (
tf.Variable) – tf.Variable that keeps track of the training steps.ckpt (
tf.train.Checkpoint) – checkpoint to use to keep track of models status.
- Return type
-
property
classifier_model¶ Retrieve the Model Object.
- Return type
Model- Returns
-