Comments (2)
从错误信息看,发生错误的pybind并非使用的是MLab HomePod 2.0 pro内置的pybind11:
gemfield@homepod:~/src$ dpkg -l | grep pybind11
ii pybind11-dev 2.4.3-2build2 all seamless operability between C++11 and Python
而是libtorch中打包的pybind:
/deepvac/libtorch/include/pybind11/pybind11.h:1315:13: note: candidate: ??template<class Func, class ... Extra> pybind11::class_< <template-parameter-1-1>, <template-parameter-1-2> >& pybind11::class_< <template-parameter-1-1>, <template-parameter-1-2> >::def(const char*, Func&&, const Extra& ...) [with Func = Func; Extra = {Extra ...}; type_ = deepvac::SyszuxPornCls; options = {}]??
1315 | class_ &def(const char *name_, Func&& f, const Extra&... extra) {
| ^~~
但是刚才测试发现,这两者都会报错。
from mlab.
这是因为错误中的process函数实现了重载:
std::optional<std::pair<int, float>> process(cv::Mat frame);
at::Tensor process(at::Tensor& t);
所以PYBIND11_MODULE的语法:
py::class_<SyszuxVisionTerror>(m, "SyszuxVisionTerror")
.def(py::init<std::string>())
.def("process", &SyszuxVisionTerror::process);
需要改写为:
py::class_<SyszuxVisionTerror>(m, "SyszuxVisionTerror")
.def(py::init<std::string>())
.def("process", py::overload_cast<at::Tensor&>(&SyszuxVisionTerror::process), "forward at Tensor.")
.def("process", py::overload_cast<cv::Mat>(&SyszuxVisionTerror::process), "forward cv Mat.");
from mlab.
Related Issues (20)
- tensorrt runtime has depency on pycuda HOT 2
- homepod:2.0-pro torch.cuda.is_available return False and throws " Error 804: forward compatibility was attempted on non supported HW " HOT 5
- MLab HomdPod 2.1 待添加功能
- MLab RookPod 1.0 计划的功能
- Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired HOT 1
- [新功能] 自MLab HomePod 2.0 pro以来pytorch的更新 HOT 3
- coremltools >= 5.0b2 is required while numpy >= 1.20 HOT 1
- pytorch: RuntimeError: 1D tensors expected, but got 2D and 2D tensors HOT 1
- pytorch: RuntimeError: 1D tensors expected, but got 2D and 2D tensors HOT 2
- undefined symbol: _ZN3c106ivalue6Future15extractDataPtrsERKNS_6IValueE HOT 1
- HomePod上训练“TEXT CLASSIFICATION WITH THE TORCHTEXT LIBRARY”例子报错 HOT 1
- Resource punkt not found. Please use the NLTK Downloader to obtain the resource: HOT 1
- RuntimeError: cuda runtime error (710) : device-side assert triggered at ...... HOT 2
- OSError: [E050] Can't find model 'de_core_news_sm'. It doesn't seem to be a Python package or a valid path to a data directory. HOT 1
- 跑PyTorch transformer demo的时候报错:ModuleNotFoundError: No module named 'spacy' HOT 1
- 运行woeusb时出错 HOT 1
- docker pull image,pull到一半的时候报错:unauthorized: authentication required HOT 1
- Error reading custom ACPI table. (VERR_FILE_NOT_FOUND). HOT 1
- docker 启动一半报错startplasma-x11 不存在 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlab.