-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0e6ded
commit 72d863f
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import unittest | ||
from model_optimization import load_optimized_model # Replace with the actual module name | ||
|
||
class TestModelLoading(unittest.TestCase): | ||
def test_model_loading(self): | ||
"""Test if the optimized model loads correctly.""" | ||
model = load_optimized_model() | ||
self.assertIsNotNone(model, "The model should not be None after loading.") | ||
self.assertTrue(hasattr(model, 'predict'), "The loaded model should have a 'predict' method.") | ||
|
||
def test_model_input_shape(self): | ||
"""Test if the model input shape is as expected.""" | ||
model = load_optimized_model() | ||
input_shape = model.input_shape | ||
self.assertEqual(input_shape, (None, 224, 224, 3), "Model input shape should be (None, 224, 224, 3).") | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |