GeneratorL1

Inheritance Diagram

Inheritance diagram of ashpy.losses.gan.GeneratorL1

class ashpy.losses.gan.GeneratorL1[source]

Bases: ashpy.losses.gan.GANExecutor

L1 loss between the generator output and the target.

\[L_G = E ||x - G(z)||_1\]

Where x is the target and G(z) is generated image.

Methods

__init__()

Initialize the Executor.

call(*args, **kwargs)

Attributes

fn

Return the Keras loss function to execute.

global_batch_size

Global batch size comprises the batch size for each cpu.

weight

Return the loss weight.

class L1Loss[source]

Bases: tensorflow.python.keras.losses.Loss

L1 Loss implementation as tf.keras.losses.Loss.

__init__()[source]

Initialize the Loss.

Return type

None

call(x, y)[source]

Compute the mean of the l1 between x and y.

Return type

Tensor

property reduction

Return the current reduction for this type of loss.

Return type

ReductionV2

__init__()[source]

Initialize the Executor.

Return type

None