Exemplo n.º 1
0
 def test_save_to_disk_on_size_threshold(self):
     model = onnx_from_path(ONNX_MODELS["const_foldable"].path)
     model = infer_shapes(model, save_to_disk_threshold_bytes=0)
     self.check_model(model)
Exemplo n.º 2
0
 def test_path(self):
     model = infer_shapes(ONNX_MODELS["identity_identity"].path)
     self.check_model(model)
Exemplo n.º 3
0
 def test_external_data(self, set_data_dir):
     model = ONNX_MODELS["ext_weights_same_dir"]
     model = infer_shapes(
         model.path,
         external_data_dir=model.ext_data if set_data_dir else None)
     self.check_model(model)
Exemplo n.º 4
0
 def test_model(self):
     original_model = onnx_from_path(ONNX_MODELS["identity_identity"].path)
     model = infer_shapes(original_model)
     self.check_model(model)