Begin templating

This commit is contained in:
2023-10-30 22:45:35 +01:00
parent e26acc3676
commit 77c33942f6
9 changed files with 64 additions and 16 deletions

View File

@@ -1,6 +1,9 @@
#ifndef PYCLASSIFER_H
#define PYCLASSIFER_H
#include <string>
#include <map>
#include <vector>
#include <torch/torch.h>
#include "PyWrap.h"
namespace pywrap {
@@ -8,7 +11,9 @@ namespace pywrap {
public:
PyClassifier(const std::string& module, const std::string& className);
virtual ~PyClassifier();
void callMethod(const std::string& method);
PyClassifier& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states);
template <typename T>
T callMethod(const std::string& method);
private:
PyWrap* pyWrap;
std::string module;