mirror of
https://github.com/WallabyLester/RBF-aPID-Controller.git
synced 2026-02-06 12:43:06 +08:00
Added test for output shape of the model.
This commit is contained in:
@@ -36,6 +36,13 @@ class TestRBFAdaptiveModel(unittest.TestCase):
|
||||
self.assertIsInstance(self.model.rbf_layer, RBFLayer)
|
||||
self.assertEqual(self.model.output_layer.units, 1)
|
||||
|
||||
def test_call_output_shape(self):
|
||||
""" Test the call method for output shape."""
|
||||
inputs = tf.random.normal((3, self.input_dim))
|
||||
output = self.model(inputs)
|
||||
|
||||
self.assertEqual(output.shape, (3, 1))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user