(self, summary_type, use_summ_proj=True)
return summary
Args:
      summary_type: str, "last", "first", "mean", or "attn". The method
        to pool the input to get a vector representation.
      use_summ_proj: bool, whether to use a linear projection during pooling.

    Returns:
      float32 Tensor in shape [bsz, d_model], the pooled representation.
Args:
      summary_type: str, "last", "first", "mean", or "attn". The method
        to pool the input to get a vector representation.
      use_summ_proj: bool, whether to use a linear projection during pooling.
Args : summary_type : str last first mean or attn . The method to pool the input to get a vector representation . use_summ_proj : bool whether to use a linear projection during pooling .
def get_pooled_out(self, summary_type, use_summ_proj=True):
    """
    Args:
      summary_type: str, "last", "first", "mean", or "attn". The method
        to pool the input to get a vector representation.
      use_summ_proj: bool, whether to use a linear projection during pooling.

    Returns:
      float32 Tensor in shape [bsz, d_model], the pooled representation.
    """

    xlnet_config = self.xlnet_config
    run_config = self.run_config

    with tf.variable_scope("model", reuse=tf.AUTO_REUSE):
      summary = modeling.summarize_sequence(
          summary_type=summary_type,
          hidden=self.output,
          d_model=xlnet_config.d_model,
          n_head=xlnet_config.n_head,
          d_head=xlnet_config.d_head,
          dropout=run_config.dropout,
          dropatt=run_config.dropatt,
          is_training=run_config.is_training,
          input_mask=self.input_mask,
          initializer=self.initializer,
          use_proj=use_summ_proj)

    return summary
def get_pooled_out ( self , summary_type , use_summ_proj = True ) : xlnet_config = self . xlnet_config run_config = self . run_config with tf . variable_scope ( "model" , reuse = tf . AUTO_REUSE ) : summary = modeling . summarize_sequence ( summary_type = summary_type , hidden = self . output , d_model = xlnet_config . d_model , n_head = xlnet_config . n_head , d_head = xlnet_config . d_head , dropout = run_config . dropout , dropatt = run_config . dropatt , is_training = run_config . is_training , input_mask = self . input_mask , initializer = self . initializer , use_proj = use_summ_proj ) return summary