コード例 #1
0
 def test_x_has_non_empty_batch_shape(self):
     with self.test_session():
         x = self._rng.rand(2, 3, 4, 5)
         num_event_dims = 2
         batch_shape = operator_pd.extract_batch_shape(x, num_event_dims)
         self.assertAllEqual([2, 3], batch_shape.eval())
コード例 #2
0
 def test_x_has_empty_batch_shape(self):
   with self.test_session():
     x = self._rng.rand(2, 3)
     num_event_dims = 2
     batch_shape = operator_pd.extract_batch_shape(x, num_event_dims)
     self.assertAllEqual([], batch_shape.eval())
コード例 #3
0
 def testXHasNonEmptyBatchShape(self):
   with self.test_session():
     x = self._rng.rand(2, 3, 4, 5)
     num_event_dims = 2
     batch_shape = operator_pd.extract_batch_shape(x, num_event_dims)
     self.assertAllEqual([2, 3], batch_shape.eval())
コード例 #4
0
 def testXHasEmptyBatchShape(self):
     with self.test_session():
         x = self._rng.rand(2, 3)
         num_event_dims = 2
         batch_shape = operator_pd.extract_batch_shape(x, num_event_dims)
         self.assertAllEqual([], batch_shape.eval())