예제 #1
0
 def test_explicit(self):
     for units in DIMS:
         identity = random_gaussian_batch(batch_size=units, units=units)
         rdlayer = RMNumpy(units=units)
         fields = rdlayer.propagate(identity, explicit=True)
         inverse_fields = rdlayer.inverse_propagate(rdlayer.transform(identity), explicit=True)
         self.assertAllClose(fields, inverse_fields)
예제 #2
0
 def test(self):
     for units in DIMS:
         identity = np.eye(units)
         rdlayer = RMNumpy(units=units)
         fields = rdlayer.propagate(identity)
         inverse_fields = rdlayer.inverse_propagate(rdlayer.transform(identity))
         self.assertAllClose(fields, inverse_fields)
예제 #3
0
 def test(self):
     for units in DIMS:
         batch = random_gaussian_batch(batch_size=units, units=units)
         rdlayer = RMNumpy(units=units)
         fields = rdlayer.propagate(batch)
         inverse_fields = rdlayer.inverse_propagate(rdlayer.transform(batch))
         self.assertAllClose(fields, inverse_fields)