Skip to content

N2N Algorithm Config

Source

N2N Algorithm configuration.

N2NAlgorithm

Bases: UNetBasedAlgorithm

Noise2Noise Algorithm configuration.

algorithm = 'n2n' class-attribute instance-attribute

N2N Algorithm name.

loss = 'mae' class-attribute instance-attribute

N2N-compatible loss function.

lr_scheduler = LrSchedulerConfig() class-attribute instance-attribute

Learning rate scheduler to use, defined in SupportedLrScheduler.

model instance-attribute

UNet without a final activation function, without the n2v2 modifications, and without independent channels for mismatching input/output channel numbers.

optimizer = OptimizerConfig() class-attribute instance-attribute

Optimizer to use, defined in SupportedOptimizer.

__str__()

Pretty string representing the configuration.

Returns:

  • str

    Pretty string.

get_algorithm_citations()

Return a list of citation entries of the current algorithm.

This is used to generate the model description for the BioImage Model Zoo.

Returns:

  • List[CiteEntry]

    List of citation entries.

get_algorithm_description()

Get the algorithm description.

Returns:

  • str

    Algorithm description.

get_algorithm_friendly_name()

Get the algorithm friendly name.

Returns:

  • str

    Friendly name of the algorithm.

get_algorithm_keywords()

Get algorithm keywords.

Returns:

get_algorithm_references()

Get the algorithm references.

This is used to generate the README of the BioImage Model Zoo export.

Returns:

  • str

    Algorithm references.

get_num_input_channels()

Get the number of input channels.

Returns:

  • int

    Number of input channels.

is_supervised() classmethod

Return whether the algorithm is supervised.

Returns:

  • bool

    Whether the algorithm is supervised.

uses_batch_norm()

Return whether the model uses batch normalization.

Returns:

  • bool

    Whether the model uses batch normalization.