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

可以做商品砍价的网站seo外链查询工具

可以做商品砍价的网站,seo外链查询工具,佛山seo整站优化承接,安徽合肥中国建设银行网站首页安装Miniconda 下载对应系统版本的Miniconda。我的系统是ubuntu,所以选择Miniconda3 Linux 64-bit。下载后执行下载的sh脚本 sh Miniconda3-latest-Linux-x86_64.sh -b执行后,运行conda初始化命令 ~/miniconda3/bin/conda init关闭当前命令终端&#…

安装Miniconda

下载对应系统版本的Miniconda。我的系统是ubuntu,所以选择Miniconda3 Linux 64-bit。下载后执行下载的sh脚本

sh Miniconda3-latest-Linux-x86_64.sh -b

执行后,运行conda初始化命令

~/miniconda3/bin/conda init

关闭当前命令终端,打开新的终端,创建一个新的环境

conda create --name tensorflow python=3.9 -y

激活tensorflow环境

conda activate tensorflow

安装tensorflow

pip install tensorflow==2.8.0
pip install tensorflow-probability==0.16.0

基本数据操作

导入tensorflow,创建一个行向量x,包含以0开始的前12个整数,默认创建的为整数。

import tensorflow as tfx = tf.range(12)# 可以通过shape属性来访问张量的形状
x.shape# 获取张量中元素总数
tf.size(x)
# tf.Tensor(12, shape=(), dtype=int32)# 改变张量的形状,不改变元素数量和元素值
x = tf.reshape(x, (3, 4))
"""
输出x
tf.Tensor(
[[ 0  1  2  3][ 4  5  6  7][ 8  9 10 11]], shape=(3, 4), dtype=int32)
"""# 创建全0张量,形状为(2,3,4)
tf.zeros((2, 3, 4))
"""
tf.Tensor(
[[[0. 0. 0. 0.][0. 0. 0. 0.][0. 0. 0. 0.]][[0. 0. 0. 0.][0. 0. 0. 0.][0. 0. 0. 0.]]], shape=(2, 3, 4), dtype=float32)
"""# 创建全1张量,形状为(2, 3, 4)
tf.ones((2, 3, 4))
"""
tf.Tensor(
[[[1. 1. 1. 1.][1. 1. 1. 1.][1. 1. 1. 1.]][[1. 1. 1. 1.][1. 1. 1. 1.][1. 1. 1. 1.]]], shape=(2, 3, 4), dtype=float32)
"""# 创建形状为(3,4)的张量,每个元素都从均值为0、标准差为1的标准高斯分布中随机采样
tf.random.normal(shape=[3, 4])
"""
tf.Tensor(
[[-0.09441569  0.38432765  0.14562869 -1.4273915 ][-1.2483802  -0.5629799   0.61917394  0.95960045][-0.23416954  0.78880084  0.5428484   0.5864796 ]], shape=(3, 4), dtype=float32)
"""# 创建包含数值的Python列表,为所需张量中的每个元素赋予确定的值。
tf.constant([[2, 1, 4, 3], [1, 2, 3, 4], [4, 3, 2, 1]])
"""
tf.Tensor(
[[2 1 4 3][1 2 3 4][4 3 2 1]], shape=(3, 4), dtype=int32)
"""

运算符

# 张量的基本运算符(+、-、/、**)
x = tf.constant([1.0, 2, 4, 8])
y = tf.constant([2.0, 2, 2, 2])
x + y, x - y, x * y, x / y, x ** y  # **运算符是求幂运算
"""
tf.Tensor([ 3.  4.  6. 10.], shape=(4,), dtype=float32)
tf.Tensor([-1.  0.  2.  6.], shape=(4,), dtype=float32)
tf.Tensor([ 2.  4.  8. 16.], shape=(4,), dtype=float32)
tf.Tensor([0.5 1.  2.  4. ], shape=(4,), dtype=float32)
tf.Tensor([ 1.  4. 16. 64.], shape=(4,), dtype=float32)
"""# “按元素”方式可以应用更多的计算,包括像求幂这样的一元运算符。
tf.exp(x)
"""
tf.Tensor([2.7182817e+00 7.3890562e+00 5.4598148e+01 2.9809580e+03], shape=(4,), dtype=float32)
"""# 多个张量连结在一起
X = tf.reshape(tf.range(12, dtype=tf.float32), (3, 4))
Y = tf.constant([[2.0, 1, 4, 3], [1, 2, 3, 4], [4, 3, 2, 1]])
tf.concat([X, Y], axis=0), tf.concat([X, Y], axis=1)
"""
tf.Tensor(
[[ 0.  1.  2.  3.][ 4.  5.  6.  7.][ 8.  9. 10. 11.][ 2.  1.  4.  3.][ 1.  2.  3.  4.][ 4.  3.  2.  1.]], shape=(6, 4), dtype=float32) tf.Tensor(
[[ 0.  1.  2.  3.  2.  1.  4.  3.][ 4.  5.  6.  7.  1.  2.  3.  4.][ 8.  9. 10. 11.  4.  3.  2.  1.]], shape=(3, 8), dtype=float32)
"""# 通过逻辑运算符构建二元张量
X == Y
"""
tf.Tensor(
[[False  True False  True][False False False False][False False False False]], shape=(3, 4), dtype=bool)
"""
http://www.dinnco.com/news/64995.html

相关文章:

  • 南京做网站具体需要多少钱优化seo是什么意思
  • 平台建站上海网站推广公司
  • 个人网站效果图咋做搜索关键词排名优化服务
  • 手机网站建设沈阳360优化大师官方免费下载
  • 建网站备案专业seo优化公司
  • 德州制作网站哪家最专业网站搜索引擎优化的步骤
  • 响应式网站是什么情况网页制作学习
  • 查询网站备案密码是什么网络营销案例分析ppt
  • 怎么建设手机网站sem竞价托管多少钱
  • txt网站推荐汽车推广软文
  • 南京网站建设网站制作重庆百度seo代理
  • 2015年做那些网站致富aso优化分析
  • 设计公司企业网站详情app排名优化公司
  • 能够做冶金工程毕业设计的网站seo推广培训中心
  • 成都网站建设是什么意思网络培训总结
  • 中小学网站建设规范seo技术培训江门
  • 视频运营管理网站seo标题优化是什么意思
  • 如何在谷歌做网站外链乌海网站seo
  • 一个网站的二维码怎么做实时热搜榜榜单
  • 网站怎么做宣传湖南长沙seo教育
  • 找人给公司做网站去哪找短视频seo推广隐迅推专业
  • seon是什么意思班级优化大师的功能
  • wordpress虚拟资源手机网站关键词seo
  • 网站分别百度官网网址
  • 青岛 网站制作百度seo工作室
  • 西红柿怎么做网站2024年1月新冠高峰期
  • 做电影网站许可证免费网站的软件
  • 网站要咋做网站建设高端公司
  • 网站建设教程视频手机优化器
  • b2c的电子信息网站看啥网一个没有人工干预的网