
Pytorch
文章平均质量分 90
AI吃大瓜
计算机视觉高级研究员,主要从事人工智能AI算法研究工作;熟悉多模态大模型,RAG技术,小模型开发如人脸检测,人脸识别,活体识别以及2D/3D Pose(人体姿态估计),行人重识别ReID等深度学习开发工作,具有丰富的项目开发工作经验。
展开
-
YOLOv5 BUG修复记录
result type Float can‘t be cast to the desired output type __int64原创 2022-12-15 11:25:17 · 2000 阅读 · 0 评论 -
PyTorch多卡分布式训练DistributedDataParallel 使用方法
Pytorch多卡训练有两种方式,一种是单进程多GPU训练模式(single process multi-gpus),另一种的多进程多卡模式(multi-processes multi-gpus)。Pytorch通过nn.DataParallel可实现多卡训练模型(简称DP模式),这是single process multi-gpus 的多卡并行机制,这种并行模式下并行的多卡都是由一个进程进行控制,其缺点有:尽管 DataLoader 可以指定 num_work原创 2022-02-07 11:15:08 · 12490 阅读 · 6 评论 -
[ShapeInferenceError] Mismatch between number of source and target dimensions. Source=1 Target=0
Pytorch转ONNX模型正常,但使用onnxruntime加载onnx模型,会输出错误:onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Exception during loading: /onnxruntime_src/onnxruntime/core/graph/function.cc:420 onnxruntime::FunctionImpl::FunctionImpl(con原创 2021-07-06 17:08:28 · 2815 阅读 · 0 评论 -
Pytorch骨干网络性能测试
Pytorch骨干网络性能测试测试平台:Intel® Core™ i7-8700 CPU @ 3.20GHz × 12 GeForce RTX 2070/PCIe/SSE2backbone input size output size run time /ms GPU/MiB mobilenet_v2 [1,3,112,112]...原创 2019-08-15 20:25:46 · 1649 阅读 · 1 评论 -
Pytorch模型迁移和迁移学习,导入部分模型参数
Pytorch模型迁移和迁移学习目录Pytorch模型迁移和迁移学习1. 利用resnet18做迁移学习2. 修改网络名称并迁移学习3.去除原模型的某些模块1. 利用resnet18做迁移学习import torchfrom torchvision import modelsif __name__ == "__main__": # device =...原创 2019-06-29 18:20:51 · 13365 阅读 · 5 评论 -
Pytorch学习笔记
Pytorch学习笔记目录目录Pytorch学习笔记1.nn.moduleList 和Sequential用法和实例1.1、nn.Sequential():模型建立方式2. Pytorch基本操作expand()扩展维度的contiguous()torch.ge,torch.gt,torch.le逐元素比较3. Pytorch常用工具Pytorch可...原创 2019-07-10 08:56:21 · 1526 阅读 · 0 评论 -
Pytorch自定义Dataset和DataLoader去除不存在和空的数据
Pytorch自定义Dataset和DataLoader去除不存在和空的数据【源码GitHub地址】:https://github.com/PanJinquan/pytorch-learning-tutorials/tree/master/image_classification/utils觉得可以,麻烦给个”Star“目录Pytorch自定义Dataset和DataLoader去...原创 2019-06-07 19:01:23 · 18652 阅读 · 5 评论 -
from torch._C import * ImportError: DLL load failed解决方法
from torch._C import * ImportError: DLL load failed解决方法import torch会出现如下错误:import torch File "D:\ProgramData\Anaconda3\envs\pytorch-py36\lib\site-packages\torch\__init__.py", line 79, in <...原创 2019-06-05 11:52:16 · 10423 阅读 · 1 评论 -
pytorch实现L2和L1正则化regularization的方法
pytorch实现L2和L1正则化的方法目录目录pytorch实现L2和L1正则化的方法1.torch.optim优化器实现L2正则化2. 如何判断正则化作用了模型?2.1 未加入正则化loss和Accuracy2.1 加入正则化loss和Accuracy2.3 正则化说明3.自定义正则化的方法3.1 自定义正则化Regularization类3.2...原创 2019-03-14 16:44:27 · 120893 阅读 · 28 评论 -
pytorch Dataset, DataLoader产生自定义的训练数据
pytorch Dataset, DataLoader产生自定义的训练数据目录pytorch Dataset, DataLoader产生自定义的训练数据1. torch.utils.data.Dataset2. torch.utils.data.DataLoader3. 使用Dataset, DataLoader产生自定义训练数据3.1 自定义Dataset3.2 Da...原创 2019-03-08 13:42:12 · 51368 阅读 · 4 评论