@Test public void makeFromNonExistentOnnxFile() { MenohException e = assertThrows( MenohException.class, () -> ModelData.fromOnnxFile("__NON_EXISTENT_FILENAME__")); assertAll("non-existent onnx file", () -> assertEquals(ErrorCode.INVALID_FILENAME, e.getErrorCode()), () -> assertEquals( "menoh invalid filename error: __NON_EXISTENT_FILENAME__ (invalid_filename)", e.getMessage()) ); }
public static ModelData fromOnnxFile(String onnxModelPath) throws MenohException { final PointerByReference handle = new PointerByReference(); checkError(MenohNative.INSTANCE.menoh_make_model_data_from_onnx(onnxModelPath, handle)); return new ModelData(handle.getValue()); }
ModelData implements AutoCloseable { public static ModelData fromOnnxFile(String onnxModelPath) throws MenohException { final PointerByReference handle = new PointerByReference(); checkError(MenohNative.INSTANCE.menoh_make_model_data_from_onnx(onnxModelPath, handle)); return new ModelData(handle.getValue()); } }
ModelData implements AutoCloseable { public static ModelData fromOnnxFile(String onnxModelPath) throws MenohException { final PointerByReference handle = new PointerByReference(); checkError(MenohNative.INSTANCE.menoh_make_model_data_from_onnx(onnxModelPath, handle)); return new ModelData(handle.getValue()); } private  ModelData(Pointer handle); }
ModelData implements AutoCloseable { public static ModelData fromOnnxFile(String onnxModelPath) throws MenohException { final PointerByReference handle = new PointerByReference(); checkError(MenohNative.INSTANCE.menoh_make_model_data_from_onnx(onnxModelPath, handle)); return new ModelData(handle.getValue()); } private  ModelData(Pointer handle); ModelData optimize(VariableProfileTable vpt); @Override void close(); static ModelData fromOnnxFile(String onnxModelPath); }
ModelData implements AutoCloseable { public static ModelData fromOnnxFile(String onnxModelPath) throws MenohException { final PointerByReference handle = new PointerByReference(); checkError(MenohNative.INSTANCE.menoh_make_model_data_from_onnx(onnxModelPath, handle)); return new ModelData(handle.getValue()); } private  ModelData(Pointer handle); ModelData optimize(VariableProfileTable vpt); @Override void close(); static ModelData fromOnnxFile(String onnxModelPath);  }