def setUp(self):
np.random.seed(1337)
h_val = np.random.randn(2, 5)
b0_val = np.random.randn(5)
b1_val = np.random.randn(1, 5)
b2_val = 7
self.my_h = ad.Variable(h_val, name="h")
self.my_b0 = ad.Variable(b0_val, name="b0")
self.my_b1 = ad.Variable(b1_val, name="b1")
self.my_b2 = ad.Variable(b2_val, name="b2")
self.tf_h = tf.constant(h_val, dtype=tf.float64)
self.tf_b0 = tf.constant(b0_val, dtype=tf.float64)
self.tf_b1 = tf.constant(b1_val, dtype=tf.float64)
self.tf_b2 = tf.constant(b2_val, dtype=tf.float64)
评论列表
文章目录