class_docstr: Tests :class:`~texar.tf.modules.XLNetClassifier` class.
      
docstr: Tests the functionality of automatically collecting trainable
  variables.
code: def test_trainable_variables(self):
      """Tests the functionality of automatically collecting trainable
      variables.
      """
      inputs = tf.placeholder(dtype=tf.int32, shape=[None, None])
  
      # case 1
      hparams = {
          "pretrained_model_name": None,
      }
      clas = XLNetClassifier(hparams=hparams)
      clas(inputs)
      n_xlnet_vars = 162
      n_projection_vars = 2
      n_logits_vars = 2
      self.assertEqual(
          len(clas.trainable_variables),
          n_xlnet_vars + n_logits_vars + n_projection_vars,
      )
  
      # case 2
      hparams = {
          "pretrained_model_name": None,
          "clas_strategy": "time_wise",
      }
      clas = XLNetClassifier(hparams=hparams)
      clas(inputs)
      self.assertEqual(
          len(clas.trainable_variables),
          n_xlnet_vars + n_logits_vars + n_projection_vars,
      )
  
      # case 3
      hparams = {
          "pretrained_model_name": None,
          "clas_strategy": "all_time",
      }
      clas = XLNetClassifier(hparams=hparams)
      clas(inputs)
      self.assertEqual(
          len(clas.trainable_variables),
          n_xlnet_vars + n_logits_vars + n_projection_vars,
      )
  
file_path: texar/tests/modules/classifiers/xlnet_classifier_test.py
imports: import numpy
  import tensorflow
  from texar.tf.modules.classifiers.xlnet_classifier import XLNetClassifier
  from texar.tf.utils.test import pretrained_test
label_desc: Use image node_id 2 for calling the XLNetClassifierTest obj's underlying member method code with example usage: obj.test_trainable_variables() without return types