class_docstr: Tests :class:`~texar.tf.modules.XLNetRegressor` class.
      
docstr: Test the type of regression output.
code: def test_regression(self):
      """Test the type of regression output."""
      batch_size = 8
  
      hparams = {
          "pretrained_model_name": None,
          "regr_strategy": "cls_time",
      }
      inputs = tf.placeholder(tf.int32, shape=[batch_size, 6])
      regressor = XLNetRegressor(hparams=hparams)
      logits = regressor(inputs)
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          logits_ = sess.run(
              logits,
              feed_dict={
                  inputs: np.random.randint(30521, size=(batch_size, 6))
              },
          )
          self.assertEqual(logits_.dtype, np.float32)
  
file_path: texar/tests/modules/regressors/xlnet_regressor_test.py
imports: import numpy
  import tensorflow
  from texar.tf.modules.regressors.xlnet_regressor import XLNetRegressor
  from texar.tf.utils.test import pretrained_test
label_desc: Use image node_id 4 for calling the XLNetRegressorTest obj's underlying member method code with example usage: obj.test_regression() without return types