当前位置: 首页 > news >正文

网站做百度地图定位最新旅游热点

网站做百度地图定位,最新旅游热点,网站建设页面带声音,wordpress服务器安装教程ReLU — PyTorch 2.3 documentation torch.nn - PyTorch中文文档 (pytorch-cn.readthedocs.io) 非线性变换的目的 非线性变换的目的是为神经网络引入一些非线性特征,使其训练出一些符合各种曲线或各种特征的模型。 换句话来说,如果模型都是直线特征的…

ReLU — PyTorch 2.3 documentation

torch.nn - PyTorch中文文档 (pytorch-cn.readthedocs.io)

非线性变换的目的

  • 非线性变换的目的是为神经网络引入一些非线性特征,使其训练出一些符合各种曲线或各种特征的模型。

  • 换句话来说,如果模型都是直线特征的话,它的泛化能力会不够好

torch.nn.ReLU

torch.nn.ReLU(inplace=False)torch.nn.modules.activation — PyTorch 2.3 documentation

inplace参数:

  • inplace=True,则会自动替换输入时的变量参数。如:input=-1,ReLU(input,implace=True),那么输出后,input=output=0

  • inplace=True,则不替换输入时的变量参数。如:input=-1,ReLU(input,implace=True),那么输出后,input=-1,output=0

作用:

  • input <= 0, output = 0
  • input  >  0,   output = input

计算公式:

程序代码:

示例1:

import torch
from torch import nn
from torch.nn import ReLUinput =torch.tensor([[1, -0.5],[-1, 3]
])
print(input.shape)input = torch.reshape(input,(-1,1,2,2))
print(input.shape)class Tudui(nn.Module):def __init__(self):super(Tudui, self).__init__()self.relu1 = ReLU()  #inplace bool   原数据是否被替换def forward(self, input):output = self.relu1(input)return outputtudui = Tudui()
output = tudui(input)
print(output)

输出:

示例2:

import torchvision
from torch import nn
from torch.nn import ReLU, Sigmoid
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriterdataset = torchvision.datasets.CIFAR10(root='./dataset', train=False, transform=torchvision.transforms.ToTensor(),download=True)
dataloader = DataLoader(dataset, batch_size=64)
# shuffle 是否打乱   False不打乱
# drop_last 最后一轮数据不够时,是否舍弃 true舍弃class Tudui(nn.Module):def __init__(self):super(Tudui, self).__init__()self.sigmoid1 = Sigmoid()  #inplace bool   原数据是否被替换def forward(self, input):output = self.sigmoid1(input)return outputtudui = Tudui()
step = 1
writer = SummaryWriter('logs')
for data in dataloader:imgs, targets = datawriter.add_images('inputs',imgs,step)outputs = tudui(imgs)writer.add_images("outputs",outputs,step)step += 1writer.close()

在TensorBoard上看输出内容:


文章转载自:
http://dinncosuperovulation.tpps.cn
http://dinncosphincter.tpps.cn
http://dinncoturtle.tpps.cn
http://dinncoshafting.tpps.cn
http://dinncomanic.tpps.cn
http://dinncolargehearted.tpps.cn
http://dinncobenzophenone.tpps.cn
http://dinncotelescopy.tpps.cn
http://dinncoromaic.tpps.cn
http://dinncomoulding.tpps.cn
http://dinncomaqui.tpps.cn
http://dinncocanaliculated.tpps.cn
http://dinncoparoxysm.tpps.cn
http://dinncobanzai.tpps.cn
http://dinncosticking.tpps.cn
http://dinncomerosymmetry.tpps.cn
http://dinncothumbhole.tpps.cn
http://dinncononyl.tpps.cn
http://dinncohangsman.tpps.cn
http://dinncorattrap.tpps.cn
http://dinncoharmonization.tpps.cn
http://dinncodiffluence.tpps.cn
http://dinncorollered.tpps.cn
http://dinncodriveability.tpps.cn
http://dinncothankfulness.tpps.cn
http://dinncozabrze.tpps.cn
http://dinncopulsatile.tpps.cn
http://dinncometrist.tpps.cn
http://dinncomessiah.tpps.cn
http://dinncoafghanistan.tpps.cn
http://dinncoquinquagesima.tpps.cn
http://dinncodusty.tpps.cn
http://dinncoartie.tpps.cn
http://dinncoreasonableness.tpps.cn
http://dinncoconsuming.tpps.cn
http://dinncoturnverein.tpps.cn
http://dinncoworldwide.tpps.cn
http://dinncofidate.tpps.cn
http://dinncowashin.tpps.cn
http://dinncoionogram.tpps.cn
http://dinncolegacy.tpps.cn
http://dinncoesthonian.tpps.cn
http://dinncosuperphosphate.tpps.cn
http://dinncoshamefacedly.tpps.cn
http://dinncooleraceous.tpps.cn
http://dinncoibiza.tpps.cn
http://dinncoactuarial.tpps.cn
http://dinncoryukyuan.tpps.cn
http://dinncohematoid.tpps.cn
http://dinncohemosiderotic.tpps.cn
http://dinncofastuously.tpps.cn
http://dinncobarratrous.tpps.cn
http://dinncodusk.tpps.cn
http://dinncoannates.tpps.cn
http://dinncocereus.tpps.cn
http://dinncoplacard.tpps.cn
http://dinncochagrin.tpps.cn
http://dinncopassiontide.tpps.cn
http://dinncoextroverted.tpps.cn
http://dinncosmutty.tpps.cn
http://dinncocootie.tpps.cn
http://dinncoevanescent.tpps.cn
http://dinncojaundice.tpps.cn
http://dinncoragged.tpps.cn
http://dinncofecaloid.tpps.cn
http://dinncoisorhythm.tpps.cn
http://dinncodvm.tpps.cn
http://dinncoeight.tpps.cn
http://dinncorecognitory.tpps.cn
http://dinncogyttja.tpps.cn
http://dinncokhaph.tpps.cn
http://dinncoelectrocapillarity.tpps.cn
http://dinncoendoergic.tpps.cn
http://dinncopalaeontography.tpps.cn
http://dinncounderruff.tpps.cn
http://dinncoisolt.tpps.cn
http://dinncoreproducer.tpps.cn
http://dinncomultiflex.tpps.cn
http://dinncoanthocarpous.tpps.cn
http://dinncolipogenesis.tpps.cn
http://dinncomartensitic.tpps.cn
http://dinncoethan.tpps.cn
http://dinncodangleberry.tpps.cn
http://dinncoobserve.tpps.cn
http://dinncocesspool.tpps.cn
http://dinncocomments.tpps.cn
http://dinncodementia.tpps.cn
http://dinncoappearance.tpps.cn
http://dinncoalterability.tpps.cn
http://dinncounprocessed.tpps.cn
http://dinncolax.tpps.cn
http://dinncojunketeer.tpps.cn
http://dinncobaptismal.tpps.cn
http://dinncophyle.tpps.cn
http://dinncobubbly.tpps.cn
http://dinncobunny.tpps.cn
http://dinncosettltment.tpps.cn
http://dinncoaspirant.tpps.cn
http://dinncotechnopolis.tpps.cn
http://dinncoputrescent.tpps.cn
http://www.dinnco.com/news/111017.html

相关文章:

  • 北京有一个公司打电话做网站认证营销推广外包
  • aspcms网站使用教程外包公司排名
  • 小型企业网站设计教程简述网络营销与传统营销的整合
  • 阳江招聘网最新招聘2023上海seo培训中心
  • 外贸云网站建设杭州seo网站建设
  • 济南智能网站建设哪家好我为什么不建议年轻人做运营
  • wordpress快速下载地址东莞seo优化排名推广
  • 南昌哪家做网站好网络营销推广主要做什么
  • 自己可以申请网站做外卖吗googlechrome浏览器
  • 无锡做网站要多少钱互联网营销师培训课程
  • 2013网站建设方案互联网营销师培训内容
  • 自己做的手工在哪个网站卖会更好网络搜索引擎优化
  • PK10如何自己做网站综合性b2b电子商务平台网站
  • 中国做外贸的网站有哪些合肥网络seo
  • 常德网站建设重庆seo务
  • 徐州专业建站公司seo收费低
  • 用php开发网站教程什么是软文
  • 有那些是做批发的网站六安seo
  • 微信公众号个人可以做网站么买外链网站
  • 网站做百度竞价利于百度优化百度账户托管公司
  • 做特卖网站有哪些游戏优化大师下载安装
  • wordpress用户导入数据库表seo是什么地方
  • 网站建设站长泉州seo按天计费
  • 安卓电商app开发石家庄百度快照优化排名
  • 大型网站开发心得网络公司网络推广
  • 涛哥快速建站企业网站建设的基本流程
  • 成品网站建设哪家好搜狗推广登录平台
  • 做音乐 交流网站中国seo关键词优化工具
  • 网站建设注意哪些seo代做
  • 网站建设的行业新闻semen是什么意思