ResidualBlock

class lib.model.nn_blocks.ResidualBlock(filters: int, kernel_size: int | tuple[int, int] = 3, padding: str = 'same', **kwargs)

Bases: object

Residual block from dfaker.

Parameters:
  • filters (int) – The dimensionality of the output space (i.e. the number of output filters in the convolution)

  • kernel_size (int, optional) – An integer or tuple/list of 2 integers, specifying the height and width of the 2D convolution window. Can be a single integer to specify the same value for all spatial dimensions. Default: 3

  • padding (["valid", "same"], optional) – The padding to use. Default: “same”

  • kwargs (dict) – Any additional Keras standard layer keyword arguments to pass to the Convolutional 2D layer

Returns:

The output tensor from the Upscale layer

Return type:

tensor

Methods Summary

__call__(inputs)

Call the Faceswap Residual Block.

Methods Documentation

__call__(inputs: KerasTensor) KerasTensor

Call the Faceswap Residual Block.

Parameters:

inputs (keras.KerasTensor) – The input to the layer

Returns:

The output tensor from the Upscale Layer

Return type:

keras.KerasTensor

__call__(inputs: KerasTensor) KerasTensor

Call the Faceswap Residual Block.

Parameters:

inputs (keras.KerasTensor) – The input to the layer

Returns:

The output tensor from the Upscale Layer

Return type:

keras.KerasTensor