From 32dae03ad10d0c4b38eba0d0e8611cb0b07c8c63 Mon Sep 17 00:00:00 2001 From: Andru Liu <90433630+WallabyLester@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:43:09 -0700 Subject: [PATCH] Test init of the model. --- TF_Implementation/test/test_RBF_tf.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/TF_Implementation/test/test_RBF_tf.py b/TF_Implementation/test/test_RBF_tf.py index 74a5401..f9e63eb 100644 --- a/TF_Implementation/test/test_RBF_tf.py +++ b/TF_Implementation/test/test_RBF_tf.py @@ -23,7 +23,19 @@ class TestRBFLayer(unittest.TestCase): self.assertEqual(output.shape, (3, self.n_centers)) self.assertTrue(tf.reduce_all(output >= 0)) - +class TestRBFAdaptiveModel(unittest.TestCase): + def setUp(self): + """ Set up a RBFAdaptiveModel class instance.""" + self.n_centers = 5 + self.input_dim = 3 + self.model = RBFAdaptiveModel(self.n_centers, self.input_dim) + + def test_initialization(self): + """ Test the initialization of the model.""" + self.assertIsInstance(self.model.rbf_layer, RBFLayer) + self.assertEqual(self.model.output_layer.units, 1) + + if __name__ == '__main__': unittest.main()