-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactorize NativeLayer, interface does not rely on the platform #3138
refactorize NativeLayer, interface does not rely on the platform #3138
Conversation
wanghan-iapcm
commented
Jan 12, 2024
- add parameter shape consistency check for layer
- add input-output shape consistency check for net
self.b1 = np.full((3,), 4.0) | ||
self.idt0 = np.full((2,), 4.0) | ||
with self.assertRaises(ValueError) as context: | ||
network = NativeLayer.deserialize( |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning test
redefined
) | ||
assert "not equalt to shape of b" in context.exception | ||
with self.assertRaises(ValueError) as context: | ||
network = NativeLayer.deserialize( |
Check notice
Code scanning / CodeQL
Unused local variable Note test
np.testing.assert_array_equal(network[0]["activation_function"], "tanh") | ||
np.testing.assert_array_equal(network[1]["activation_function"], "tanh") | ||
np.testing.assert_array_equal(network[0]["resnet"], True) | ||
np.testing.assert_array_equal(network[1]["resnet"], True) | ||
|
||
def test_shape_error(self): | ||
with self.assertRaises(ValueError) as context: | ||
network = NativeNet.deserialize( |
Check notice
Code scanning / CodeQL
Unused local variable Note test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3138 +/- ##
==========================================
+ Coverage 76.15% 76.18% +0.02%
==========================================
Files 252 252
Lines 25345 25368 +23
Branches 1579 1579
==========================================
+ Hits 19302 19326 +24
+ Misses 5118 5117 -1
Partials 925 925 ☔ View full report in Codecov by Sentry. |