forked from apple/coremltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoreMLPython.h
30 lines (25 loc) · 823 Bytes
/
CoreMLPython.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wexit-time-destructors"
#pragma clang diagnostic ignored "-Wdocumentation"
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#pragma clang diagnostic pop
#import <CoreML/CoreML.h>
namespace py = pybind11;
namespace CoreML {
namespace Python {
class Model {
private:
MLModel *m_model = nil;
NSURL *compiledUrl = nil;
public:
Model(const Model&) = delete;
Model& operator=(const Model&) = delete;
~Model();
explicit Model(const std::string& urlStr);
py::dict predict(const py::dict& input, bool useCPUOnly);
static int32_t maximumSupportedSpecificationVersion();
std::string toString() const;
};
}
}