![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
文章平均质量分 57
吴大炮
机器学习入门者
展开
-
RESA 车道线检测模型-debug分析
上述代码中的一些超参数,是我自己设置的,便于看,免得看config了,这个的关键就是如何x.add_是怎么加的,这里面用到了一些索引,我们具体来dubug看一下。看到这里大家应该就明白了吧,主要实现错位的相加,依照这个顺序执行的啊,这样就实现了文中说的消息的传递,比CNN好。该模型只有一个关键点就是resa模块,把这个想清楚就没什么了,下面看代码。原创 2024-04-15 23:31:47 · 271 阅读 · 1 评论 -
轻量化模块整理,即插即用
总结一下轻量化的模块,可以即插即用的,原创 2024-04-13 16:55:40 · 820 阅读 · 0 评论 -
卷积、转置卷积、膨胀卷积学习记录
卷积、转置卷积、膨胀卷积学习记录原创 2022-12-29 11:35:29 · 628 阅读 · 0 评论 -
深度学习实验2:卷积神经网络
卷积神经网络实验原创 2022-07-20 11:34:46 · 3454 阅读 · 10 评论 -
注意力机制(SE、Coordinate Attention、CBAM、ECA,SimAM)、即插即用的模块整理
总结曾经使用过的一些即插即用的模块以及一些注意力机制注意力模块:SE代码源自这位大佬的仓库:https://github.com/moskomule/senet.pytorchclass SELayer(nn.Module): def __init__(self, channel, reduction=16): super(SELayer, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1)原创 2021-12-23 11:16:22 · 41140 阅读 · 40 评论 -
深度学习实验1:pytorch实践与前馈神经网络
深度学习实验1:pytorch实践与前馈神经网络1、pytorch基本操作原创 2021-09-13 20:47:38 · 7391 阅读 · 5 评论 -
pytorch5:pytorch常用激活函数图像绘制
记录一下import numpy as npimport mathimport matplotlib.pyplot as pltdef sigmod(): x = np.arange(-10, 10, 0.1) print(x) y = [] for t in x: y_1 = 1 / (1 + math.exp(-t)) y.append(y_1) print(y) plt.plot(x, y, label="s原创 2021-07-26 23:38:08 · 1137 阅读 · 0 评论 -
pytorch4:简单的线性回归
#-*- codeing = utf-8 -*- #@Time: 2021/5/12 21:28#@Author : dapao#@File : linear_regression.py#@Software: PyCharm#线性回归 ,自定义生成数据集,然后进行拟合import randomimport torch##生成数据def synthetic_data(w,b,num_examples): '''生成y = Xw + b + 噪声。''' X = tor原创 2021-05-12 22:11:12 · 203 阅读 · 0 评论 -
pytorch学习2:搭建VGG16网络,利用预训练权重网络进行训练
#微调预训练的VGG16网络import numpy as npimport pandas as pdfrom sklearn.metrics import accuracy_score,confusion_matrix,classification_reportimport matplotlib.pyplot as pltimport seaborn as snsimport hiddenlayer as hlimport torchimport torch.nn as nnfrom原创 2021-05-12 21:28:01 · 2517 阅读 · 0 评论 -
pytorch学习2:pytorch搭建Alexnet网络
推荐神仙up主 霹雳吧啦Wz 我的代码基本就是按照他的代码自己写了一遍加深印象,有兴趣的可以去看看,强烈推荐。我写这个博客只是记录一下学习的过程,防止忘记。添加了一些注释,帮助理解。1、模型import torch.nn as nnimport torchclass AlexNet(nn.Module): def __init__(self,num_classes = 1000,init_weights = False): super(AlexNet,self).__ini原创 2021-04-19 21:19:25 · 317 阅读 · 0 评论 -
pytorch学习1:pytorch 定义网络的方式
#-- codeing = utf-8 --#@Time: 2021/4/13 22:06#@Author : dapao#@File : chapter_3.6.py#@Software: PyCharmimport torchimport torch.nn as nnfrom torch.optim import SGDimport torch.utils.data as Datafrom sklearn.datasets import load_bostonfrom sklearn原创 2021-04-13 22:55:15 · 297 阅读 · 0 评论