LibtorchTutorials icon indicating copy to clipboard operation
LibtorchTutorials copied to clipboard

This is a code repository for pytorch c++ (or libtorch) tutorial.

Results 7 LibtorchTutorials issues
Sort by recently updated
recently updated
newest added
trafficstars

你好,考虑到模型加速的问题,请问下使用libtorch训练得到的pt模型,如何导出onnx?或者如何直接通过tensorRT加速?

I download libtorch,and unzip it . libtorch/include/c10/cuda/CUDAStream.h:6:10: fatal error: cuda_runtime_api.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. why,tks

你好, 请教一下,Torch::Device对象可以作为函数形参吗? 我们封装模型推理器时,怎么让调用者可以动态指定计算设备?

你好,我刚刚接触libtorch但在使用的过程中出现了问题。我使用gpu的时候在运行 "module.to(device_type);" 时出现了不动的问题。 情况如下图。在运行到81行给模型加载到gpu时出现了下面这种情况。 ![Snipaste_2021-12-27_17-12-08](https://user-images.githubusercontent.com/90226334/147455927-3e99dece-c883-4d4f-b6af-ddf26adac2e3.png) 在使用cpu时一切正常。 我的环境是 cuda10.2、cudnn(8.3.1 / 7.6.5)这两个版本都试过、libtorch1.8.0-release、VS2019、pytorch1.8.0。

您好,非常感谢您提供的教程,我在利用RTX3080和训练好的模型推理过程中遇到这样的奇怪问题: 利用ros播放bag包, 程序从ros topic中获取, 第一次推理时间为0.2s,而后20次推理时间为12s左右,这之后的推理时间稳定在0.03s左右了,请问您有遇到过类似的现象吗?有什么好的解决办法呢?谢谢啦

Where did you learn to code LibTorch in C++? Most resources that I find are only for python. Is there a textbook for C++ LibTorch?