Skip to content

layerfactory

layerfactory

Module for layerfactories

Classes

Conv2DBlockFactory

Conv2DBlockFactory(
    channel_list,
    kernel_size=3,
    activation="relu",
    dropout_values=None,
)

Bases: LayerFactory

Layer factory for a convolution block

Source code in niceml/dlframeworks/keras/models/layerfactory.py
def __init__(
    self,
    channel_list: List[int],
    kernel_size: int = 3,
    activation: str = "relu",
    dropout_values: Optional[List[float]] = None,
):
    self.channel_list = channel_list
    self.kernel_size = kernel_size
    self.activation = activation
    self.dropout_values = dropout_values

DownscaleConvBlockFactory

DownscaleConvBlockFactory(
    channel_list,
    kernel_size=3,
    activation="relu",
    dropout_values=None,
)

Bases: LayerFactory

Layer factory for a downscale convolution block

Source code in niceml/dlframeworks/keras/models/layerfactory.py
def __init__(
    self,
    channel_list: List[int],
    kernel_size: int = 3,
    activation: str = "relu",
    dropout_values: Optional[List[float]] = None,
):
    self.channel_list = channel_list
    self.kernel_size = kernel_size
    self.activation = activation
    self.dropout_values = dropout_values

LayerFactory

Bases: ABC

Base class for layer factories

Functions
create_layers abstractmethod
create_layers(input_layer)

Creates one or multiple layers from an input layer

Source code in niceml/dlframeworks/keras/models/layerfactory.py
@abstractmethod
def create_layers(self, input_layer):
    """Creates one or multiple layers from an input layer"""