Refactor singleton to manage cleanup

This commit is contained in:
2023-11-04 11:00:21 +01:00
parent 9b5e7b1ca7
commit 8b159f239b
9 changed files with 104 additions and 181 deletions

View File

@@ -15,9 +15,9 @@ namespace pywrap {
torch::Tensor predict(torch::Tensor& X);
double score(torch::Tensor& X, torch::Tensor& y);
std::string version();
std::string graph();
std::string callMethodString(const std::string& method);
private:
PyObject* toPyObject(torch::Tensor& tensor);
PyWrap* pyWrap;
std::string module;
std::string className;