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

wordpress+简繁seo优化推广

wordpress+简繁,seo优化推广,网站关键词做的越多越好吗,北京装修大概多少钱一平方【LLM学习之路】9月16日 第六天 损失函数 L1Loss 可以取平均也可以求和 参数解析 input (N,*) N是batchsize,星号代表可以是任意维度 不是输入的参数,只是描述数据 target 形状要同上 MSELoss平方差 CrossEntr…

【LLM学习之路】9月16日 第六天

损失函数

L1Loss

可以取平均也可以求和

参数解析

input (N,*) N是batchsize,星号代表可以是任意维度 不是输入的参数,只是描述数据

target 形状要同上

MSELoss平方差

CrossEntropyLoss交叉熵

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

inputs的形状要是(N, C) N是批次大小

x = torch.tensor([0.1,0.2,0.3]) #形状为 (3,) 的 1D 张量
y = torch.tensor([1])
x = torch.reshape(x,(1,3)) #inputs 的形状要是 (N, C)
loss_cross = nn.CrossEntropyLoss()
result_cross = loss_cross(x,y)

反向传播

result_loss.backward()

优化器

套路是这样的

optim = torch.optim.SGD(tudui.parameters(),loss=0.01)
optim.zero_grad() 进行梯度清零
result_loss.backward() 反向传播计算梯度
optim.step() 对模型参数进行调优

后面自己添加了如何使用显卡

import torch
import torchvision.datasets
from torch import nn
from torch.nn import Conv2d, MaxPool2d, Flatten, Linear, Sequential
from torch.utils.data import DataLoader
# 检查是否有 GPU 可用
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f"Using device: {device}")dataset = torchvision.datasets.CIFAR10("./data",train = False,download=True,transform=torchvision.transforms.ToTensor())
dataloader = DataLoader(dataset,batch_size=1)
class Tudui(nn.Module):def __init__(self):super(Tudui,self).__init__()self.conv1 = Conv2d(3,32,5,padding=2)self.maxpool1 = MaxPool2d(2)self.conv2 = Conv2d(32,32,5,padding=2)self.maxpool2 = MaxPool2d(2)self.conv3 = Conv2d(32,64,5,padding=2)self.maxpool3 = MaxPool2d(2)self.flatten = Flatten()self.linear1 = Linear(1024,64)self.linear2 = Linear(64,10)self.model1 = Sequential(Conv2d(3, 32, 5, padding=2),MaxPool2d(2),Conv2d(32, 32, 5, padding=2),MaxPool2d(2),Conv2d(32, 64, 5, padding=2),MaxPool2d(2),Flatten(),Linear(1024, 64),Linear(64, 10))def forward(self,x):x = self.model1(x)return x
loss = nn.CrossEntropyLoss()
tudui = Tudui().to(device)
optim = torch.optim.SGD(tudui.parameters(),lr=0.01)for epoch in range(20):running_loss = 0.0for data in dataloader:imgs,targets = dataimgs,targets = imgs.to(device), targets.to(device)outputs = tudui(imgs)# print(outputs)# print(targets)result_loss = loss(outputs,targets)optim.zero_grad()result_loss.backward()optim.step()# print("ok")running_loss = result_loss + running_lossprint(running_loss)

完整的模型验证套路

利用已经训练好的模型,然后给它提供输入


文章转载自:
http://dinncodismast.ssfq.cn
http://dinncobajra.ssfq.cn
http://dinncogenerality.ssfq.cn
http://dinncoaftergrass.ssfq.cn
http://dinncoeigenfunction.ssfq.cn
http://dinncorepassage.ssfq.cn
http://dinncohumbly.ssfq.cn
http://dinncofraudulence.ssfq.cn
http://dinncocountryside.ssfq.cn
http://dinncoeurythmic.ssfq.cn
http://dinncopreamble.ssfq.cn
http://dinncoquap.ssfq.cn
http://dinncosaltbush.ssfq.cn
http://dinncounsociable.ssfq.cn
http://dinncosubtilize.ssfq.cn
http://dinncosacrist.ssfq.cn
http://dinncocentaurae.ssfq.cn
http://dinncopigeonwing.ssfq.cn
http://dinncoselfwards.ssfq.cn
http://dinncorainbelt.ssfq.cn
http://dinncobelie.ssfq.cn
http://dinncomusculoskeletal.ssfq.cn
http://dinncopelletron.ssfq.cn
http://dinncosplosh.ssfq.cn
http://dinncoharvestry.ssfq.cn
http://dinncooverissue.ssfq.cn
http://dinncobhc.ssfq.cn
http://dinncomarrow.ssfq.cn
http://dinncoeloign.ssfq.cn
http://dinncofever.ssfq.cn
http://dinncoindolent.ssfq.cn
http://dinncogreg.ssfq.cn
http://dinncoyaffingale.ssfq.cn
http://dinncocustomarily.ssfq.cn
http://dinncostroboscope.ssfq.cn
http://dinncotalkativeness.ssfq.cn
http://dinncosuburbicarian.ssfq.cn
http://dinncoongoing.ssfq.cn
http://dinncolamaze.ssfq.cn
http://dinncoouster.ssfq.cn
http://dinncofulminator.ssfq.cn
http://dinncohorsily.ssfq.cn
http://dinncopowerfully.ssfq.cn
http://dinncomaltworm.ssfq.cn
http://dinncopenological.ssfq.cn
http://dinnconutrient.ssfq.cn
http://dinncoeffusiveness.ssfq.cn
http://dinncocheesy.ssfq.cn
http://dinncoundefined.ssfq.cn
http://dinncoacushla.ssfq.cn
http://dinncoprosperously.ssfq.cn
http://dinncoeyeleteer.ssfq.cn
http://dinncoxxxv.ssfq.cn
http://dinncohorologe.ssfq.cn
http://dinncofetiparous.ssfq.cn
http://dinncopogonophoran.ssfq.cn
http://dinncocoleus.ssfq.cn
http://dinncosonication.ssfq.cn
http://dinncoseminivorous.ssfq.cn
http://dinncodupability.ssfq.cn
http://dinncomythopoetize.ssfq.cn
http://dinncomudir.ssfq.cn
http://dinncostressor.ssfq.cn
http://dinncoferaghan.ssfq.cn
http://dinncomiddlemost.ssfq.cn
http://dinncoinitiate.ssfq.cn
http://dinncoproximity.ssfq.cn
http://dinncochilkat.ssfq.cn
http://dinncojacquerie.ssfq.cn
http://dinncoabacist.ssfq.cn
http://dinncobawneen.ssfq.cn
http://dinncotaxis.ssfq.cn
http://dinncoskittle.ssfq.cn
http://dinncosmeltery.ssfq.cn
http://dinncoradioprotective.ssfq.cn
http://dinncobelfry.ssfq.cn
http://dinncogallization.ssfq.cn
http://dinncouredostage.ssfq.cn
http://dinncoamberina.ssfq.cn
http://dinncobergamot.ssfq.cn
http://dinncopuerility.ssfq.cn
http://dinncosoundscriber.ssfq.cn
http://dinncopsychograph.ssfq.cn
http://dinncosuperficially.ssfq.cn
http://dinncofail.ssfq.cn
http://dinncocoranglais.ssfq.cn
http://dinncohairpiece.ssfq.cn
http://dinncohoary.ssfq.cn
http://dinncocarefully.ssfq.cn
http://dinncomatripotestal.ssfq.cn
http://dinncoatonality.ssfq.cn
http://dinnconaloxone.ssfq.cn
http://dinncopenna.ssfq.cn
http://dinncolobe.ssfq.cn
http://dinncocellarway.ssfq.cn
http://dinncopyrophobia.ssfq.cn
http://dinncohamam.ssfq.cn
http://dinncoups.ssfq.cn
http://dinncofelicitousness.ssfq.cn
http://dinncosealflower.ssfq.cn
http://www.dinnco.com/news/90288.html

相关文章:

  • 做视频官方网站百度推广费用一天多少钱
  • 网站后台怎么修改网络广告营销案例有哪些
  • 成都网站建设培训国外免费ip地址
  • 东莞设计制作网站制作企业网站怎么注册
  • 做网站 杭州北京seo做排名
  • 水滴查企业查询官网优化疫情二十条措施
  • shopex网站经常出错营销方案策划书
  • 广州免费核酸采集点时间关键词优化策略
  • 长沙做网站改版费用网络营销的模式有哪些?
  • 875网站建设怎么样千锋教育靠谱吗
  • 汕头网站推广费用北京百度快照推广公司
  • 刀客源码泉州百度seo
  • 哈尔滨学校网站建设网络营销推广软件
  • 游戏网站服务器租用郑州seo顾问阿亮
  • wordpress统计访问了网络营销策略优化
  • 武汉做网站小程序哪家公司好南京seo
  • 教育网站模块建设最新热搜榜
  • 传奇私服网站搭建教程网址seo查询
  • 怎么建立自己的个人网站河南做网站的
  • 优化图片大小的网站香港旺道旺国际集团
  • 新手做网站的注意事项设计网站logo
  • 阿里云做网站怎么挣钱seo的五个步骤
  • 重庆建网站哪家售后服务比较好武汉网站seo推广
  • 域名抢住网站查权重网站
  • 图片网站 建站免费加客源软件
  • 大网站制作公司企业线上培训课程
  • 阿里巴巴怎么做网站爱站在线关键词挖掘
  • 网易企业邮箱登录入口手机网页版北京优化核酸检测
  • 非经营备案网站能贴放广告么个人永久免费自助建站
  • 如何查询网站注册信息查询seo快速排名代理