class_docstr: Main function for Stochastic Adversarial Video Prediction.
docstr: Pad, apply 3-D convolution and leaky relu.
docstr_tok: ["Pad",",","apply","3-D","convolution","and","leaky","relu","."]
code: def pad_conv3d_lrelu(
      self, activations, n_filters, kernel_size, strides, scope
  ):
      """Pad, apply 3-D convolution and leaky relu."""
      padding = [[0, 0], [1, 1], [1, 1], [1, 1], [0, 0]]
  
      # tf.nn.conv3d accepts a list of 5 values for strides
      # with first and last value equal to 1
      if isinstance(strides, numbers.Integral):
          strides = [strides] * 3
      strides = [1] + strides + [1]
  
      # Filter_shape = [K, K, K, num_input, num_output]
      filter_shape = (
          [kernel_size] * 3
          + activations.shape[-1:].as_list()
          + [n_filters]
      )
  
      with tf.variable_scope(scope, reuse=tf.AUTO_REUSE):
          conv_filter = tf.get_variable(
              "conv_filter",
              shape=filter_shape,
              initializer=tf.truncated_normal_initializer(stddev=0.02),
          )
  
          if self.hparams.use_spectral_norm:
              (
                  conv_filter,
                  assign_op,
              ) = common_layers.apply_spectral_norm(conv_filter)
              if self.is_training:
                  tf.add_to_collection(
                      tf.GraphKeys.UPDATE_OPS, assign_op
                  )
  
          padded = tf.pad(activations, padding)
          convolved = tf.nn.conv3d(
              padded, conv_filter, strides=strides, padding="VALID"
          )
          rectified = tf.nn.leaky_relu(convolved, alpha=0.2)
      return rectified
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numbers
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.models.video import savp_params
  from tensor2tensor.models.video import sv2p
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import update_ops_hook
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_gan
label_desc: Use image node_id 9 for calling the NextFrameSavpBase obj's underlying member method code with example usage: obj.pad_conv3d_lrelu(activations, n_filters, kernel_size, strides, scope) and returns: rectified