Skip to content

defaultmodelcompiler

defaultmodelcompiler

Module for model compilers in keras

Classes

ComplexModelCompiler

ComplexModelCompiler(optimizer, metrics, losses=None)

Bases: ModelCompiler

Complex model compiler for keras

Source code in niceml/dlframeworks/keras/modelcompiler/defaultmodelcompiler.py
def __init__(
    self,
    optimizer: Union[dict, Any],
    metrics: List,
    losses: dict = None,
):
    self.losses = losses
    self.optimizer = optimizer
    self.metrics = metrics

DefaultModelCompiler

DefaultModelCompiler(loss, metrics, optimizer, **kwargs)

Bases: ModelCompiler

Simplest model compiler for keras

Source code in niceml/dlframeworks/keras/modelcompiler/defaultmodelcompiler.py
def __init__(
    self, loss: Union[str, dict], metrics: List, optimizer: dict, **kwargs
):
    self.loss = loss
    self.metrics = metrics
    self.optimizer = optimizer
    self.compiler_args: dict = kwargs