![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
libtorch
hanqu3456
这个作者很懒,什么都没留下…
展开
-
libtorch学习笔记(2)
libtorch学习笔记(2)pytorch与libtorch对应的api1.torch.unique == torch::unique_dim2.torch.cat == torch::cat3.torch.argmax == torch::argmax4.原创 2022-03-24 16:02:23 · 1257 阅读 · 0 评论 -
libtorch学习笔记(1)
libtorch学习笔记1常用函数1. print_tensor_data 打印tensor的值2. 读取txt生成tensor3. 保存tensor到txt4. load权重文件wts常用函数1. print_tensor_data 打印tensor的值template <typename T>void print_tensor_data(torch::Tensor tsor,std::string name, int64_t start, int64_t end){ s原创 2022-03-18 15:13:29 · 600 阅读 · 0 评论