pixelcnn_conv2d_resnet

tfsnippet.layers.pixelcnn_conv2d_resnet(*args, **kwargs)

PixelCNN 2D convolutional ResNet block.

Parameters:
  • input (PixelCNN2DOutput) – The output from the previous PixelCNN layer.
  • out_channels (int) – The channel numbers of the output.
  • conv_fn – The convolution function for “conv_0” and “conv_1” convolutional layers. See resnet_general_block().
  • vertical_kernel_size (int or tuple[int]) – Kernel size over spatial dimensions, for “conv_0” and “conv_1” convolutional layers in the PixelCNN vertical stack.
  • horizontal_kernel_size (int or tuple[int]) – Kernel size over spatial dimensions, for “conv_0” and “conv_1” convolutional layers in the PixelCNN horizontal stack.
  • strides (int or tuple[int]) – Strides over spatial dimensions, for “conv_0”, “conv_1” and “shortcut” convolutional layers.
  • channels_last (bool) – Whether or not the channel axis is the last axis in input? (i.e., the data format is “NHWC”)
  • use_shortcut_conv (True or None) – If True, force to apply a linear convolution transformation on the shortcut path. If None (by default), only use shortcut if necessary.
  • shortcut_conv_fn – The convolution function for the “shortcut” convolutional layer. If not specified, use conv_fn.
  • shortcut_kernel_size (int or tuple[int]) – Kernel size over spatial dimensions, for the “shortcut” convolutional layer.
  • activation_fn – The activation function.
  • normalizer_fn – The normalizer function.
  • dropout_fn – The dropout function.
  • gated (bool) – Whether or not to use gate on the output of “conv_1”? conv_1_output = activation_fn(conv_1_output) * sigmoid(gate).
  • gate_sigmoid_bias (Tensor) – The bias added to gate before applying the sigmoid activation.
  • use_bias (bool or None) – Whether or not to use bias in “conv_0” and “conv_1”? If True, will always use bias. If None, will use bias only if normalizer_fn is not given. If False, will never use bias. Default is None.
  • name (str) – Default name of the variable scope. Will be uniquified. If not specified, generate one according to the class name.
  • scope (str) – The name of the variable scope.
  • **kwargs – Other named arguments passed to “conv_0”, “conv_1” and “shortcut” convolutional layers.
Returns:

The PixelCNN layer output.

Return type:

PixelCNN2DOutput