dltk.networks.gan package

dltk.networks.gan.dcgan module

dltk.networks.gan.dcgan.dcgan_discriminator_3d(inputs, filters=(64, 128, 256, 512), strides=((2, 2, 2), (2, 2, 2), (1, 2, 2), (1, 2, 2)), mode='eval', use_bias=False)[source]

Deep convolutional generative adversarial network (DCGAN) discriminator network with num_convolutions on len(filters) resolution scales. The downsampling of features is done via strided convolutions. On each resolution scale s are num_convolutions with filter size = filters[s]. strides[s] determine the downsampling factor at each resolution scale.

Parameters:
  • inputs (tf.Tensor) – Input tensor to the network, required to be of rank 5.
  • num_convolutions (int, optional) – Number of convolutions per resolution scale.
  • filters (tuple, optional) – Number of filters for all convolutions at each resolution scale.
  • strides (tuple, optional) – Stride of the first convolution on a resolution scale.
  • mode (TYPE, optional) – One of the tf.estimator.ModeKeys strings: TRAIN, EVAL or PREDICT.
  • use_bias (bool, optional) – Boolean, whether the layer uses a bias.
Returns:

dictionary of output tensors

Return type:

dict

dltk.networks.gan.dcgan.dcgan_generator_3d(inputs, filters=(256, 128, 64, 32, 1), kernel_size=((4, 4, 4), (3, 3, 3), (3, 3, 3), (3, 3, 3), (4, 4, 4)), strides=((4, 4, 4), (1, 2, 2), (1, 2, 2), (1, 2, 2), (1, 2, 2)), mode='train', use_bias=False)[source]

Deep convolutional generative adversial network (DCGAN) generator network. with num_convolutions on len(filters) resolution scales. The upsampling of features is done via strided transpose convolutions. On each resolution scale s are num_convolutions with filter size = filters[ s]. strides[s] determine the upsampling factor at each resolution scale.

Parameters:
  • inputs (tf.Tensor) – Input noise tensor to the network.
  • out_filters (int) – Number of output filters.
  • num_convolutions (int, optional) – Number of convolutions per resolution scale.
  • filters (tuple, optional) – Number of filters for all convolutions at each resolution scale.
  • strides (tuple, optional) – Stride of the first convolution on a resolution scale.
  • mode (TYPE, optional) – One of the tf.estimator.ModeKeys strings: TRAIN, EVAL or PREDICT
  • use_bias (bool, optional) – Boolean, whether the layer uses a bias.
Returns:

dictionary of output tensors

Return type:

dict

Module contents