08 2022 档案

摘要:1 model定义 import torch.nn as nn import torch.nn.functional as F # 定义类,继承nn.Module父类,实现init函数和forward函数(正向传播) class LeNet(nn.Module): def __init__(self 阅读全文
posted @ 2022-08-26 16:42 Truman001 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1 torchstat 该工具包可通过pip直接安装: pip install torchstat 使用方法 import torchvision.models as models #pretrained=True就可以使用预训练的模型 #resnet18 = models.resnet18(pre 阅读全文
posted @ 2022-08-11 17:16 Truman001 阅读(564) 评论(0) 推荐(0) 编辑
摘要:模型导出测试 import numpy as np import torch import torch.nn as nn ## 构造随机输入,参数为shape,输入满足正太分布 input = torch.randn(4, 256, 256) input=torch.randint_like(inp 阅读全文
posted @ 2022-08-11 16:46 Truman001 阅读(104) 评论(0) 推荐(0) 编辑
摘要:一 基本使用 1 下载源代码 网址:https://github.com/ultralytics/yolov5 使用git clone到本地。 2 模型训练 ​ 使用pycharm打开yolov5文件夹,运行train.py脚本,会自动下载COCO128数据集,如果本地已有数据集,修改coco128 阅读全文
posted @ 2022-08-11 16:19 Truman001 阅读(851) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示