ClassifierContext

Inheritance Diagram

Inheritance diagram of ashpy.contexts.classifier.ClassifierContext

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.Context

ashpy.ClassifierContext provide the standard functions to test a classifier.

Methods

__init__([classifier_model, loss, dataset, …]) Instantiate the ashpy.contexts.classifier.ClassifierContext context.

Attributes

classifier_model Retrieve the Model Object.
current_batch Return the current batch.
dataset Retrieve the dataset.
exception Return the exception.
global_step Retrieve the global_step.
log_eval_mode Retrieve model(s) mode.
loss Retrieve the loss value.
metrics Retrieve the metrics.
training_set Return the training set.
validation_set Return the validation set.
__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.ClassifierContext context.

Parameters:
Return type:

None

classifier_model

Retrieve the Model Object.

Return type:Model
Returns:tf.keras.Model – The classifier model.
loss

Retrieve the loss value.

Return type:Optional[Executor]
training_set

Return the training set.

Return type:DatasetV2
Returns:tf.data.Dataset – The training set.
validation_set

Return the validation set.

Return type:Optional[DatasetV2]
Returns:tf.data.Dataset – The validation set.