classifier¶
Classifier Context.
Classes
ClassifierContext |
ashpy.ClassifierContext provide the standard functions to test a classifier. |
-
class
ashpy.contexts.classifier.ClassifierContext(classifier_model=None, loss=None, dataset=None, metrics=None, log_eval_mode=<LogEvalMode.TEST: 1>, global_step=<tf.Variable 'global_step:0' shape=() dtype=int64, numpy=0>, checkpoint=None)[source]¶ Bases:
ashpy.contexts.context.Contextashpy.ClassifierContextprovide the standard functions to test a classifier.-
__init__(classifier_model=None, loss=None, dataset=None, metrics=None, log_eval_mode=<LogEvalMode.TEST: 1>, global_step=<tf.Variable 'global_step:0' shape=() dtype=int64, numpy=0>, checkpoint=None)[source]¶ Instantiate the
ashpy.contexts.classifier.ClassifierContextcontext.Parameters: - classifier_model (
tf.keras.Model) – Atf.keras.Modelmodel. - loss (
ashpy.losses.executor.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. - checkpoint (
tf.train.Checkpoint) – checkpoint to use to keep track of models status.
Return type: - classifier_model (
-
classifier_model¶ Retrieve the Model Object.
Return type: ModelReturns: tf.keras.Model– The classifier model.
-
training_set¶ Return the training set.
Return type: DatasetV2Returns: tf.data.Dataset– The training set.
-
validation_set¶ Return the validation set.
Return type: Optional[DatasetV2]Returns: tf.data.Dataset– The validation set.
-