Adding tensor methods
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "PyClassifier.h"
|
||||
#include <torch/csrc/autograd/python_variable.h>
|
||||
|
||||
namespace pywrap {
|
||||
|
||||
@@ -13,13 +14,21 @@ namespace pywrap {
|
||||
pyWrap->clean(module, className);
|
||||
}
|
||||
|
||||
std::string PyClassifier::callMethod(const std::string& method)
|
||||
std::string PyClassifier::version()
|
||||
{
|
||||
return pyWrap->version(module, className);
|
||||
}
|
||||
|
||||
std::string PyClassifier::callMethodString(const std::string& method)
|
||||
{
|
||||
return pyWrap->callMethodString(module, className, method);
|
||||
}
|
||||
PyClassifier& 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)
|
||||
{
|
||||
|
||||
PyObject* Xp = NULL;//THPVariable_Wrap(X);
|
||||
PyObject* yp = NULL;//THPVariable_Wrap(y);
|
||||
pyWrap->fit(module, className, Xp, yp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
} /* namespace PyWrap */
|
Reference in New Issue
Block a user