Skip to content

ldctbench.methods.wganvgg.network

Discriminator(input_size)

Bases: Module

Discriminator (Critic) for WGAN-VGG training

Parameters:

  • input_size (int) –

    Input size of images fed in forward pass.

add_block(layers, ch_in, ch_out, stride) staticmethod

Append Conv -> LeakyReLU block to layer list.

Parameters:

  • layers (List[Module]) –

    List of layers

  • ch_in (int) –

    Number of input features

  • ch_out (int) –

    Number of output features

  • stride (int) –

    Desired stride of the conv layer

Returns:

  • List[Module]

    Layer list with appended layer.

conv_output_size(input_size, kernel_size_list, stride_list) staticmethod

Compute output size after feature extractor.

Parameters:

  • input_size (int) –

    Input size of images fed in forward pass.

  • kernel_size_list (List[int]) –

    List of kernel sizes for each layer.

  • stride_list (List[int]) –

    List of strides for each layer.

Returns:

  • int

    Output size after feature extractor.

Model(args)

Bases: Module

Generator for WGAN-VGG

Parameters:

  • args (Namespace) –

    Command line arguments passed to the model.