class_docstr: Tests for DpgLearning.
    
class_docstr_tok: ["Tests","for","DpgLearning","."]
docstr: Sets up test scenario.
  
  a_tm1_max = s_tm1 * w_s + b_s
  q_tm1_max = a_tm1_max * w + b
docstr_tok: ["Sets","up","test","scenario",".","a_tm1_max","=","s_tm1","*","w_s","+","b_s","q_tm1_max","=","a_tm1_max","*","w","+","b"]
code: def setUp(self):
      """Sets up test scenario.
  
      a_tm1_max = s_tm1 * w_s + b_s
      q_tm1_max = a_tm1_max * w + b
      """
      super(DpgTest, self).setUp()
      self.s_tm1 = tf.constant([[0, 1, 0], [1, 1, 2]], dtype=tf.float32)
      self.w_s = tf.Variable(tf.random_normal([3, 2]), dtype=tf.float32)
      self.b_s = tf.Variable(tf.zeros([2]), dtype=tf.float32)
      self.a_tm1_max = tf.matmul(self.s_tm1, self.w_s) + self.b_s
      self.w = tf.Variable(tf.random_normal([2, 1]), dtype=tf.float32)
      self.b = tf.Variable(tf.zeros([1]), dtype=tf.float32)
      self.q_tm1_max = tf.matmul(self.a_tm1_max, self.w) + self.b
      self.loss, self.dpg_extra = dpg_ops.dpg(
          self.q_tm1_max, self.a_tm1_max
      )
      self.batch_size = self.a_tm1_max.get_shape()[0]
  
file_path: trfl/trfl/dpg_ops_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow.compat.v1
  from trfl import dpg_ops
label_desc: Use image node_id 1 for calling the DpgTest obj's underlying member method code with example usage: obj.setUp() without return types