class_docstr: Seq2Seq model for sequence processing in O(n log n) time.
docstr: Finds max padding length.
  
  If target length not specified use fixed padding
  length from hparams.max_length.
  
  Args:
    features: Dictionary with input and target tensors
  
  Returns:
    tf.Tensor:  Length of input and output sequence. Length is power of 2.
docstr_tok: ["Finds","max","padding","length",".","If","target","length","not","specified","use","fixed","padding","length","from","hparams.max_length",".","Args",":","features",":","Dictionary","with","input","and","target","tensors","Returns",":","tf.Tensor",":","Length","of","input","and","output","sequence",".","Length","is","power","of","2","."]
code: def max_pad_length(self, features):
      """Finds max padding length.
  
      If target length not specified use fixed padding
      length from hparams.max_length.
  
      Args:
        features: Dictionary with input and target tensors
  
      Returns:
        tf.Tensor:  Length of input and output sequence. Length is power of 2.
      """
  
      if (
          self.hparams.force_max_length
          or features.get("targets") is None
      ):
          assert math.log(
              self.hparams.max_length, 2
          ).is_integer(), "hparams.max_length should be power of w"
  
          return self.hparams.max_length
  
      length = tf.shape(features["inputs"])[1]
      targets_length = tf.shape(features["targets"])[1]
      length = tf.maximum(length, targets_length)
  
      p = tf.log(tf.cast(length, tf.float32)) / tf.log(2.0)
      p = tf.cast(tf.ceil(p), tf.int32)
      return tf.pow(2, p)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 3 for calling the ShuffleNetwork obj's underlying member method code with example usage: obj.max_pad_length(features) and returns: tf, self