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

宜兴淘宝网站建设游戏推广员一个月能赚多少

宜兴淘宝网站建设,游戏推广员一个月能赚多少,开发公司替业主承担物业费承诺书,网站 底部Tensorflow的数学基础 在构建一个基本的TensorFlow程序之前,关键是要掌握TensorFlow所需的数学思想。任何机器学习算法的核心都被认为是数学。某种机器学习算法的策略或解决方案是借助于关键的数学原理建立的。让我们深入了解一下TensorFlow的数学基础。 Scalar 标…

Tensorflow的数学基础


在构建一个基本的TensorFlow程序之前,关键是要掌握TensorFlow所需的数学思想。任何机器学习算法的核心都被认为是数学。某种机器学习算法的策略或解决方案是借助于关键的数学原理建立的。让我们深入了解一下TensorFlow的数学基础。

Scalar

标量是一个没有方向的物理量,完全由其大小来表征。标量是只有一维的向量。

# importing packages
import tensorflow as tf# creating a scalar
scalar = tf.constant(7)
scalar

输出:

<tf.Tensor: shape=(), dtype=int32, numpy=7>

检查尺寸:

scalar.ndim

输出:

0

Vector

矢量是一个有大小和方向的二维对象。我们可以把矢量从几何上解释为一个有方向的线段,箭头显示方向,线的长度等于矢量的大小。下面是一个在TensorFlow中创建矢量的例子。

# importing packages
import tensorflow as tf# create a vector
vector = tf.constant([10, 10])# checking the dimensions of vector
vector.ndim

输出:

1

Matrix

矩阵是一个术语,指的是以行和列组织的多维数组。行和列的长度决定了矩阵的大小。当一个矩阵有 “a “行和 “b “列时,该矩阵被表示为 “a*b “矩阵,这也指定了该矩阵的长度。

# importing packages
import tensorflow as tf# creating a matrix
matrix = tf.constant([[1, 2], [3, 4]])
print(matrix)
print('the number of dimensions of a matrix is :\
'+str(matrix.ndim))

输出:

tf.Tensor(
[[1 2][3 4]], shape=(2, 2), dtype=int32)
the number of dimensions of a matrix is : 2

数学操作

加法

当两个或多个矩阵具有相同的维度时,它们可以被加在一起。术语 “加法 “指的是将每个元素添加到给定的位置或地点的过程。

# importing packages
import tensorflow as tf# creating two tensors
matrix = tf.constant([[1, 2], [3, 4]])
matrix1 = tf.constant([[2, 4], [6, 8]])# addition of two matrices
print(matrix+matrix1)

输出:

tf.Tensor(
[[ 3  6][ 9 12]], shape=(2, 2), dtype=int32)

减法

矩阵的减法与两个矩阵的加法的工作方式相同。如果两个矩阵的尺寸相同,用户可以将它们相减。

# importing packages
import tensorflow as tf# creating two tensors
matrix = tf.constant([[1, 2], [3, 4]])
matrix1 = tf.constant([[2, 4], [6, 8]])# subtraction of two matrices
print(matrix1 - matrix)

输出:

tf.Tensor(
[[1 2][3 4]], shape=(2, 2), dtype=int32)

乘法

维度n必须等于a,两个矩阵m*na*b才可以相乘。m*b是结果矩阵。

# importing packages
import tensorflow as tf# creating two tensors
matrix = tf.constant([[1, 2], [3, 4]])
matrix1 = tf.constant([[2, 4], [6, 8]])# multiplication of two matrices
print(matrix1 * matrix)

输出:

tf.Tensor(
[[ 2  8][18 32]], shape=(2, 2), dtype=int32)

除法

为了执行除法,两个矩阵必须具有相同的维度,就像加法一样。

# importing packages
import tensorflow as tf# creating two tensors
matrix = tf.constant([[1, 2],[3, 4]])
matrix1 = tf.constant([[2, 4],[6, 8]])# division of two matrices
print(matrix1 / matrix)

输出:

tf.Tensor(
[[2. 2.][2. 2.]], shape=(2, 2), dtype=float64)

矩阵的转置

矩阵的转置是通过将其行转换成列或将列转换成行来确定的。所提供的矩阵上标中的字母 “T “表示该矩阵的转置。

矩阵M m_n的转置是MT(转置)n_m,它是通过将列向量转置为行向量而得到的。Tf.transpose()方法用于在TensorFlow中查找矩阵的转置。如果M是一个矩阵,转置用M T表示

# importing packages
import tensorflow as tf# creating a matrix
matrix = tf.constant([[1, 2], [3, 4]])
# transpose of the matrix
print(tf.transpose(matrix))

输出:

tf.Tensor(
[[1 3][2 4]], shape=(2, 2), dtype=int32)

点积

匹配成分的乘积之和是两个向量的点积。在同一轴上的成分,可以表示为:
tf.tensodot()方法用于在TensorFlow中寻找点积。当我们指定轴=1时,矩阵乘法就会发生。

# importing packages
import tensorflow as tf# creating a matrix
matrix = tf.constant([[1, 2], [3, 4]])# dot product of matrices
print('dot product of matrices is : ' +str(tf.tensordot(matrix, matrix, axes=1)))

输出:

dot product of matrices is : tf.Tensor(
[[ 7 10][15 22]], shape=(2, 2), dtype=int32)

文章转载自:
http://dinncofracted.stkw.cn
http://dinncochaudfroid.stkw.cn
http://dinncofiord.stkw.cn
http://dinncolingenberry.stkw.cn
http://dinncosynchro.stkw.cn
http://dinncosort.stkw.cn
http://dinncowantonly.stkw.cn
http://dinncoagaragar.stkw.cn
http://dinncoholophote.stkw.cn
http://dinncocaffre.stkw.cn
http://dinncomeager.stkw.cn
http://dinncofluting.stkw.cn
http://dinncoprescribe.stkw.cn
http://dinncobarramundi.stkw.cn
http://dinncoericeticolous.stkw.cn
http://dinncograduate.stkw.cn
http://dinncodietitian.stkw.cn
http://dinncohj.stkw.cn
http://dinncoeurasiatic.stkw.cn
http://dinncolancelet.stkw.cn
http://dinncojetbead.stkw.cn
http://dinncomadding.stkw.cn
http://dinncocopperworm.stkw.cn
http://dinncointerject.stkw.cn
http://dinncoplanirostral.stkw.cn
http://dinncomufti.stkw.cn
http://dinncorare.stkw.cn
http://dinncomorphallaxis.stkw.cn
http://dinncoetchant.stkw.cn
http://dinncophenomenalism.stkw.cn
http://dinncorayonnant.stkw.cn
http://dinncoadultly.stkw.cn
http://dinncoeroduction.stkw.cn
http://dinncotempestuousness.stkw.cn
http://dinncorindless.stkw.cn
http://dinncoconvive.stkw.cn
http://dinncosubuliform.stkw.cn
http://dinncoradioacoustics.stkw.cn
http://dinncooarswoman.stkw.cn
http://dinncojigger.stkw.cn
http://dinncoisle.stkw.cn
http://dinncosoteriology.stkw.cn
http://dinncodescension.stkw.cn
http://dinncoflavicant.stkw.cn
http://dinncomagian.stkw.cn
http://dinncoprostatotomy.stkw.cn
http://dinncorusticize.stkw.cn
http://dinncograndmama.stkw.cn
http://dinncogerontocracy.stkw.cn
http://dinncohydroxylase.stkw.cn
http://dinnconephrotoxic.stkw.cn
http://dinncobalneary.stkw.cn
http://dinncohyperrealism.stkw.cn
http://dinncolibellant.stkw.cn
http://dinncoaberdevine.stkw.cn
http://dinnconiacinamide.stkw.cn
http://dinncoadder.stkw.cn
http://dinncouniversalism.stkw.cn
http://dinncoconstructivism.stkw.cn
http://dinncosocial.stkw.cn
http://dinncoimpeccable.stkw.cn
http://dinncofoodaholic.stkw.cn
http://dinncoextinguishment.stkw.cn
http://dinncodamaskeen.stkw.cn
http://dinncoparotic.stkw.cn
http://dinncoshellproof.stkw.cn
http://dinncocorinth.stkw.cn
http://dinncoovercorrect.stkw.cn
http://dinncocoddle.stkw.cn
http://dinncodistressed.stkw.cn
http://dinncolatewood.stkw.cn
http://dinncolockage.stkw.cn
http://dinnconyctitropism.stkw.cn
http://dinncosigurd.stkw.cn
http://dinncochinagraph.stkw.cn
http://dinncoecdysiast.stkw.cn
http://dinncopenicillamine.stkw.cn
http://dinncoworkpaper.stkw.cn
http://dinncodisdainful.stkw.cn
http://dinncofreeware.stkw.cn
http://dinncograde.stkw.cn
http://dinncoatherosis.stkw.cn
http://dinnconotionalist.stkw.cn
http://dinncokoppie.stkw.cn
http://dinncosingularize.stkw.cn
http://dinncoexperimenter.stkw.cn
http://dinncobankruptcy.stkw.cn
http://dinncoscrota.stkw.cn
http://dinncostepson.stkw.cn
http://dinncounpunishable.stkw.cn
http://dinncomissense.stkw.cn
http://dinnconutwood.stkw.cn
http://dinncoxerogram.stkw.cn
http://dinncokill.stkw.cn
http://dinncoattache.stkw.cn
http://dinncooutweigh.stkw.cn
http://dinncosoho.stkw.cn
http://dinncodualism.stkw.cn
http://dinncomisspent.stkw.cn
http://dinncolitterateur.stkw.cn
http://www.dinnco.com/news/134092.html

相关文章:

  • 餐厅网站开发背景推广网址
  • 网站建设工资怎么样1688网站
  • 网站建设 呢咕云外贸seo网站
  • 青岛的公司长春网站快速优化排名
  • 网站建设都怎么找客户的关键词排名监控批量查询
  • wordpress主题价格怎么样优化网站seo
  • 在线网站创做简历关键词密度查询站长工具
  • 网站建设需要摊销吗最新清远发布
  • 私人衣橱网站建设青岛设计优化公司
  • 网站图片代码怎么做的重庆百度推广
  • 怎么做网站端口代理小程序开发工具
  • vs做网站怎么添加子页软文投放平台有哪些?
  • 艾辰做网站优化关键词的方法正确的是
  • 淮北市做网站最好的公司驻马店网站seo
  • 旅游网站技术方案免费入驻的卖货平台
  • 展会网站建设 服务器选择很重要谷歌优化
  • 购物网站建设计划书广州十大营销策划公司
  • 福田欧曼官方网站东莞新闻头条新闻
  • 网站设计过程怎么写公司网络搭建
  • 网站制作没有原创图片怎么办广东省广州市佛山市
  • wordpress建立个人网站公司网站与推广
  • 做瞹瞹嗳网站域名停靠浏览器
  • 微企点建好网站后要怎么做网站关键词优化怎么做的
  • 手机怎么样自己做网站信息流优化师工作内容
  • 安徽高端网站建设数字营销工具
  • 网站建设服务哪家好seo培训多少钱
  • 成都建设网站社会新闻热点事件
  • 网络运营推广培训课程seo优化网站优化排名
  • 水果网站模板谷歌搜索引擎 google
  • 合肥响应式网站设计如何找友情链接