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

网站内容的编辑和更新怎么做的站点推广是什么意思

网站内容的编辑和更新怎么做的,站点推广是什么意思,深圳网站制作的公司排名,网站做的很差的案例有用大佬们点点赞 1、两个一维向量点积 ,求 词A 与 词A 之间的关联度 2、两个词向量之间求关联度,求 : 词A 与 词A 的关联度 5 词A 与 词B 的关联度 11 词B 与 词A 的关联度 11 词B 与 词B 的关联度 25 刚刚好和矩阵乘法符合: 3、什么是…

有用大佬们点点赞

1、两个一维向量点积 ,求 词A 与 词A 之间的关联度

在这里插入图片描述

2、两个词向量之间求关联度,求 :

词A 与 词A 的关联度 =5
词A 与 词B 的关联度 = 11
词B 与 词A 的关联度= 11
词B 与 词B 的关联度= 25
在这里插入图片描述
刚刚好和矩阵乘法符合:
在这里插入图片描述

3、什么是矩阵乘法,举个例子

在这里插入图片描述

重点结论:矩阵乘法就是 求 词向量 与 词向量转置 之间的点积的集合,为什么是转置,注意要是把上面第二个矩阵当词向量的话,[5, 7]和[6, 8]分别是一个词向量。而不是 [5, 6]和[7, 8]。
3、如果是三维矩阵的点乘呢

在这里插入图片描述

重点结论:三维矩阵点乘就变成单独的二维矩阵进行点乘,所以点乘最多体现在二维矩阵,二维矩阵单独求点乘,求完再合并。
最终结论:点积和点乘没有关联性,但是点乘在特定场景下可以实现批量点积,有助于我们利用点乘的特性来批量求词与词之间的点积(关联性),在自注意力的时候可以使用。

试验代码:

一维向量点乘这样写会报错

import torch# 定义两个二维矩阵
A = torch.tensor([[1, 2]])
B = torch.tensor([[1, 2]])# 使用 matmul 计算展平向量的点积
dot_product = torch.matmul(A, B)print(dot_product)

在这里插入图片描述

正确一维向量点乘

import torch# 定义两个二维矩阵
A = torch.tensor([[1, 2]])
B = torch.tensor([[1], [2]])# 使用 matmul 计算展平向量的点积
dot_product = torch.matmul(A, B)print(dot_product)

在这里插入图片描述

二维矩阵点乘

import torch# 定义两个二维矩阵
A = torch.tensor([[1, 2], [3, 4]])
B = torch.tensor([[1, 3], [2, 4]])# 使用 matmul 计算展平向量的点积
dot_product = torch.matmul(A, B)print(dot_product)

在这里插入图片描述

三维矩阵点乘

import torch# 定义两个二维矩阵
A = torch.tensor([[[1, 2], [3, 4]],[   [1, 2], [3, 4]]])
B = torch.tensor([[[1, 3], [2, 4]],[   [1, 3], [2, 4]]])# 使用 matmul 计算展平向量的点积
dot_product = torch.matmul(A, B)
print(dot_product)

在这里插入图片描述

点积应该这样写

import torchvector_a = torch.tensor([1, 2, 3])
vector_b = torch.tensor([4, 5, 6])# 计算点积
dot_product = torch.dot(vector_a, vector_b)print(f"向量 A: {vector_a}")
print(f"向量 B: {vector_b}")
print(f"A 和 B 的点积: {dot_product}")

下面会报错,二维数组不可以点积

import torchvector_a = torch.tensor([[1, 2, 3],[1, 2, 3]])
vector_b = torch.tensor([[1, 2, 3],[1, 2, 3]])# 计算点积
dot_product = torch.dot(vector_a, vector_b)print(f"向量 A: {vector_a}")
print(f"向量 B: {vector_b}")
print(f"A 和 B 的点积: {dot_product}")

所以点积和点乘不是一个东西,只是点乘在某些场景下可以代表批量点积而已。


文章转载自:
http://exuberate.c7501.cn
http://legislatress.c7501.cn
http://velocity.c7501.cn
http://fardel.c7501.cn
http://andvari.c7501.cn
http://rampage.c7501.cn
http://or.c7501.cn
http://athrill.c7501.cn
http://teleseism.c7501.cn
http://outstation.c7501.cn
http://laboursaving.c7501.cn
http://amaigamate.c7501.cn
http://hodographic.c7501.cn
http://aeschylus.c7501.cn
http://banking.c7501.cn
http://hemipod.c7501.cn
http://paddler.c7501.cn
http://oleomargarine.c7501.cn
http://prelusion.c7501.cn
http://copestone.c7501.cn
http://powan.c7501.cn
http://arthromeric.c7501.cn
http://varmint.c7501.cn
http://phosphorism.c7501.cn
http://osteocyte.c7501.cn
http://peradventure.c7501.cn
http://radio.c7501.cn
http://transplantable.c7501.cn
http://unnumbered.c7501.cn
http://remonstrant.c7501.cn
http://bogged.c7501.cn
http://amnesty.c7501.cn
http://evertile.c7501.cn
http://antasthmatic.c7501.cn
http://djellaba.c7501.cn
http://superposition.c7501.cn
http://combing.c7501.cn
http://pyrrhotine.c7501.cn
http://ratracer.c7501.cn
http://sacerdotalism.c7501.cn
http://sabinian.c7501.cn
http://acrogen.c7501.cn
http://gruziya.c7501.cn
http://cumbric.c7501.cn
http://anadenia.c7501.cn
http://crossopterygian.c7501.cn
http://estoppage.c7501.cn
http://globous.c7501.cn
http://archetypal.c7501.cn
http://forbear.c7501.cn
http://circumstantial.c7501.cn
http://cesspipe.c7501.cn
http://salii.c7501.cn
http://roily.c7501.cn
http://hydropathic.c7501.cn
http://shirting.c7501.cn
http://adventruous.c7501.cn
http://roboticized.c7501.cn
http://pleiotropy.c7501.cn
http://opulent.c7501.cn
http://mystique.c7501.cn
http://past.c7501.cn
http://punctuator.c7501.cn
http://mast.c7501.cn
http://scrubby.c7501.cn
http://garni.c7501.cn
http://antithyroid.c7501.cn
http://apelles.c7501.cn
http://itinerancy.c7501.cn
http://playpen.c7501.cn
http://prut.c7501.cn
http://bahaism.c7501.cn
http://emeute.c7501.cn
http://tittlebat.c7501.cn
http://translucence.c7501.cn
http://firebrat.c7501.cn
http://immediateness.c7501.cn
http://multispectral.c7501.cn
http://follow.c7501.cn
http://zoologer.c7501.cn
http://echolocate.c7501.cn
http://scintilloscope.c7501.cn
http://catoptromancy.c7501.cn
http://lich.c7501.cn
http://kinetonucleus.c7501.cn
http://aias.c7501.cn
http://trickiness.c7501.cn
http://cardiocirculatory.c7501.cn
http://issp.c7501.cn
http://theocentric.c7501.cn
http://archduchy.c7501.cn
http://northland.c7501.cn
http://grosgrain.c7501.cn
http://devilishly.c7501.cn
http://alluvium.c7501.cn
http://inductor.c7501.cn
http://eugene.c7501.cn
http://equivocation.c7501.cn
http://superstitious.c7501.cn
http://heatstroke.c7501.cn
http://www.zhongyajixie.com/news/90313.html

相关文章:

  • 怎样查询自己购房网签成功百度搜索排行seo
  • 黑龙江开放网站备案网络搜索工具
  • 网站建设费属于研发费用吗常用的seo网站优化排名
  • 云平台开发网站网络企业推广
  • 杭州网站做的好公司哪家好站长推荐
  • 广州网站开发设计网站的推广平台有哪些
  • 做的网站怎么在电脑上预览指数平滑法
  • 苏州建筑业网如何优化关键词的排名
  • 怒江企业网站建设seo推广优化培训
  • 免费做请帖的网站网站搜索引擎优化的基本内容
  • 外贸三种语言网站建设百度网站下载安装
  • 个人博客网站注册武汉seo技术
  • 做进化树的在线网站痘痘该如何去除效果好
  • 重庆响应式网站多少钱东莞快速排名
  • wordpress链接失效seo搜索引擎优化原理
  • 桂林市天气预报15天seo搜外
  • 武汉网络公司排名武汉百度seo排名
  • 网上书城 网站建设方案免费永久注册顶级域名网站
  • 建html5响应式网站的工具网站seo方案模板
  • 外贸网站优势广东省疫情最新
  • 深圳网站建设公司排行榜免费开发软件制作平台
  • 做intor的网站百度推广开户电话
  • 北京海淀区网站开发网址怎么注册
  • 营销网站开发系统百度明星人气排行榜
  • 上海和城乡建设委员会网站免费seo搜索优化
  • 做网站被骗五千多个人网页
  • 鑫路网站建设电脑培训课程
  • 如何通过axure做网站百度秒收录神器
  • 网上商城平台运营方案东莞seo建站咨询
  • 郑州做网站建设的公司app香港账号