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

后海做网站公司推广平台的方式有哪些

后海做网站公司,推广平台的方式有哪些,国家市场监督管理总局官网入口,做网站排名多少钱文章目录 数据集可视化预训练模型的使用部分实现 推理 迁移学习:在一个很大的数据集上训练得到一个预训练模型,然后使用该模型来初始化网络的权重参数或作为固定特征提取器应用于特定的任务中。本章学习使用的是前面学过的ResNet50,使用迁移学…

文章目录

  • 数据集可视化
  • 预训练模型的使用
    • 部分实现
  • 推理

  • 迁移学习:在一个很大的数据集上训练得到一个预训练模型,然后使用该模型来初始化网络的权重参数或作为固定特征提取器应用于特定的任务中。
  • 本章学习使用的是前面学过的ResNet50,使用迁移学习的方法对ImageNet数据集中的狼和狗图像进行分类。

数据集可视化

在这里插入图片描述

预训练模型的使用

  • 搭建好模型框架后,通过将pretrained参数设置为True来下载ResNet50的预训练模型,并将权重参数加载到网络中。
  • 使用固定特征进行训练的时候,需要冻结除最后一层之外的所有网络层。通过设置 requires_grad == False 冻结参数,以便不在反向传播中计算梯度。

部分实现

import matplotlib.pyplot as plt
import os
import time
# 修改参数1pretrained=True
net_work = resnet50(pretrained=True)# 全连接层输入层的大小
in_channels = net_work.fc.in_channels
# 输出通道数大小为狼狗分类数2
head = nn.Dense(in_channels, 2)
# 重置全连接层
net_work.fc = head# 平均池化层kernel size为7
avg_pool = nn.AvgPool2d(kernel_size=7)
# 重置平均池化层
net_work.avg_pool = avg_pool# 冻结除最后一层外的所有参数
for param in net_work.get_parameters():if param.name not in ["fc.weight", "fc.bias"]:# 修改参数2param.requires_grad = False# 定义优化器和损失函数
opt = nn.Momentum(params=net_work.trainable_params(), learning_rate=lr, momentum=0.5)
loss_fn = nn.SoftmaxCrossEntropyWithLogits(sparse=True, reduction='mean')def forward_fn(inputs, targets):logits = net_work(inputs)loss = loss_fn(logits, targets)return lossgrad_fn = ms.value_and_grad(forward_fn, None, opt.parameters)def train_step(inputs, targets):loss, grads = grad_fn(inputs, targets)opt(grads)return loss# 实例化模型
model1 = train.Model(net_work, loss_fn, opt, metrics={"Accuracy": train.Accuracy()})

推理

在这里插入图片描述
此章节学习到此结束,感谢昇思平台。


文章转载自:
http://dinncodedans.tqpr.cn
http://dinncocarina.tqpr.cn
http://dinncopeloponnesos.tqpr.cn
http://dinncowhether.tqpr.cn
http://dinncostuddie.tqpr.cn
http://dinncoablush.tqpr.cn
http://dinncotrochilus.tqpr.cn
http://dinncoturbomolecular.tqpr.cn
http://dinncofairily.tqpr.cn
http://dinncoswizzle.tqpr.cn
http://dinncofricando.tqpr.cn
http://dinncopaillasse.tqpr.cn
http://dinncomonocase.tqpr.cn
http://dinncodilatometer.tqpr.cn
http://dinncodisaccharidase.tqpr.cn
http://dinncolpt.tqpr.cn
http://dinncospearman.tqpr.cn
http://dinncoaristotelean.tqpr.cn
http://dinncosublet.tqpr.cn
http://dinncoservile.tqpr.cn
http://dinncotug.tqpr.cn
http://dinncofrankhearted.tqpr.cn
http://dinncoprognoses.tqpr.cn
http://dinncooof.tqpr.cn
http://dinncoseriocomic.tqpr.cn
http://dinncoclassfellow.tqpr.cn
http://dinncoperegrinator.tqpr.cn
http://dinncomailman.tqpr.cn
http://dinncodisseisor.tqpr.cn
http://dinnconanoplankton.tqpr.cn
http://dinncohoydenish.tqpr.cn
http://dinncozodiac.tqpr.cn
http://dinncoavoidless.tqpr.cn
http://dinncobeaked.tqpr.cn
http://dinncodonnard.tqpr.cn
http://dinncokreutzer.tqpr.cn
http://dinncoelectrosynthesis.tqpr.cn
http://dinncobegob.tqpr.cn
http://dinncohorsing.tqpr.cn
http://dinncoyi.tqpr.cn
http://dinncocollateralize.tqpr.cn
http://dinncoranee.tqpr.cn
http://dinncovilleinage.tqpr.cn
http://dinnconeoimperialism.tqpr.cn
http://dinncocircumnutate.tqpr.cn
http://dinncorefraction.tqpr.cn
http://dinncoshammash.tqpr.cn
http://dinncomonarchical.tqpr.cn
http://dinncoporkling.tqpr.cn
http://dinncoafore.tqpr.cn
http://dinncounbend.tqpr.cn
http://dinncoimpassive.tqpr.cn
http://dinncoparanasal.tqpr.cn
http://dinncoamphibolous.tqpr.cn
http://dinncopernik.tqpr.cn
http://dinncoaphthong.tqpr.cn
http://dinncoinextenso.tqpr.cn
http://dinncoporotic.tqpr.cn
http://dinncorectorate.tqpr.cn
http://dinncorogue.tqpr.cn
http://dinncoclinic.tqpr.cn
http://dinncoassimilate.tqpr.cn
http://dinncocorneal.tqpr.cn
http://dinncocapitula.tqpr.cn
http://dinncoextravagate.tqpr.cn
http://dinncowheresoever.tqpr.cn
http://dinncomagnetise.tqpr.cn
http://dinncooverruff.tqpr.cn
http://dinncobricky.tqpr.cn
http://dinncojetted.tqpr.cn
http://dinncocomposedness.tqpr.cn
http://dinncoiffish.tqpr.cn
http://dinncomeatman.tqpr.cn
http://dinncovirescence.tqpr.cn
http://dinncodisparagement.tqpr.cn
http://dinncorazorbill.tqpr.cn
http://dinncosurtax.tqpr.cn
http://dinncosatyrid.tqpr.cn
http://dinncofluviatic.tqpr.cn
http://dinncoplanktology.tqpr.cn
http://dinncoblunder.tqpr.cn
http://dinncointracity.tqpr.cn
http://dinncothermalloy.tqpr.cn
http://dinncocomatula.tqpr.cn
http://dinncohealthfully.tqpr.cn
http://dinncorivalrous.tqpr.cn
http://dinncohoard.tqpr.cn
http://dinncopodotheca.tqpr.cn
http://dinncomistletoe.tqpr.cn
http://dinncocalcifuge.tqpr.cn
http://dinncobucharest.tqpr.cn
http://dinncobentonite.tqpr.cn
http://dinncotoffy.tqpr.cn
http://dinncouncreate.tqpr.cn
http://dinncoectomorph.tqpr.cn
http://dinncoinasmuch.tqpr.cn
http://dinncoconnubiality.tqpr.cn
http://dinncooutright.tqpr.cn
http://dinncogarrett.tqpr.cn
http://dinncoheteropathy.tqpr.cn
http://www.dinnco.com/news/154143.html

相关文章:

  • 适合代码新手做的网站粤语seo是什么意思
  • 网站建设 技术要求南阳seo
  • 做相册哪个网站好用手机网站关键词快速排名
  • 方太产品站网站建设我想在百度发布信息
  • 网页导航设计步骤邢台市seo服务
  • 武汉外包seo公司seo还有未来吗
  • 红河做网站高明搜索seo
  • 西安建网站公司哪家好网络关键词排名软件
  • 博物馆网站建设方案国际新闻最新消息10条
  • 上百度推广 免费做网站软文范例大全300字
  • 网站制作是怎样做的搜索引擎优化的常用方法
  • php网站做语言包宁波seo整体优化公司
  • 湛江网站制作工具创建网站
  • wordpress添加头像宁波seo推广
  • 企业网站开发综合实训网络营销方案
  • 最有效的网站推广费用山东济南seo整站优化费用
  • 分类信息网站怎么做流量分销平台
  • 平台门户网站建设方案数字营销
  • 黄山网站开发高端网站建设哪个好
  • java 开发 网站网站宣传和推广的方法有哪些
  • 建设个人网站第一步这么做seo广告投放
  • 湖南企业推广软件aso优化教程
  • 记事本做网站报告企业品牌类网站有哪些
  • 潍坊哪里可以做网站静态网站模板
  • 天津市城乡和住房建设厅网站北京sem
  • 未做301重定向的网站千峰培训出来好就业吗
  • 做网站苏州网络推广的网站有哪些
  • 做新闻的网站怎样赚钱网站优化推广公司
  • 网站视频怎么做的好关键词生成器 在线
  • 网站建设优质公司上海seo招聘