MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / test_exceptions

Method test_exceptions

tests/models/test_model_save.py:275–282  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

273 self.assertLess(np.max(np.abs(ori_val - tar_weight.numpy())), 1e-7)
274
275 def test_exceptions(self):
276 print('-' * 20, 'test_exceptions', '-' * 20)
277 try:
278 ni = Input([4, 784])
279 model = Model(inputs=ni, outputs=ni)
280 model.save_weights('./empty_model.h5')
281 except Exception as e:
282 print(e)
283
284
285if __name__ == '__main__':

Callers

nothing calls this directly

Calls 3

save_weightsMethod · 0.95
InputFunction · 0.85
ModelClass · 0.85

Tested by

no test coverage detected