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

做网站排行平台创建

做网站排行,平台创建,中信建设有限责任公司张晞,如何建立和设计公司网站作文安装Miniconda 下载对应系统版本的Miniconda。我的系统是ubuntu#xff0c;所以选择Miniconda3 Linux 64-bit。下载后执行下载的sh脚本 sh Miniconda3-latest-Linux-x86_64.sh -b执行后#xff0c;运行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 python3.9 -y激活tensorflow环境 conda activate tensorflow安装tensorflow pip install tensorflow2.8.0 pip install tensorflow-probability0.16.0基本数据操作 导入tensorflow创建一个行向量x包含以0开始的前12个整数默认创建的为整数。 import tensorflow as tfx tf.range(12)# 可以通过shape属性来访问张量的形状 x.shape# 获取张量中元素总数 tf.size(x) # tf.Tensor(12, shape(), dtypeint32)# 改变张量的形状不改变元素数量和元素值 x tf.reshape(x, (3, 4))输出x tf.Tensor( [[ 0 1 2 3][ 4 5 6 7][ 8 9 10 11]], shape(3, 4), dtypeint32) # 创建全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), dtypefloat32) # 创建全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), dtypefloat32) # 创建形状为(34)的张量每个元素都从均值为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), dtypefloat32) # 创建包含数值的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), dtypeint32)运算符 # 张量的基本运算符(、-、/、**) 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,), dtypefloat32) tf.Tensor([-1. 0. 2. 6.], shape(4,), dtypefloat32) tf.Tensor([ 2. 4. 8. 16.], shape(4,), dtypefloat32) tf.Tensor([0.5 1. 2. 4. ], shape(4,), dtypefloat32) tf.Tensor([ 1. 4. 16. 64.], shape(4,), dtypefloat32) # “按元素”方式可以应用更多的计算包括像求幂这样的一元运算符。 tf.exp(x)tf.Tensor([2.7182817e00 7.3890562e00 5.4598148e01 2.9809580e03], shape(4,), dtypefloat32) # 多个张量连结在一起 X tf.reshape(tf.range(12, dtypetf.float32), (3, 4)) Y tf.constant([[2.0, 1, 4, 3], [1, 2, 3, 4], [4, 3, 2, 1]]) tf.concat([X, Y], axis0), tf.concat([X, Y], axis1)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), dtypefloat32) 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), dtypefloat32) # 通过逻辑运算符构建二元张量 X Ytf.Tensor( [[False True False True][False False False False][False False False False]], shape(3, 4), dtypebool)
http://www.tj-hxxt.cn/news/135797.html

相关文章:

  • 网站设计分享网站备案网站名称怎么填
  • 怎么免费网站重庆做网站
  • 基于微信公众号开发网站开发怎样做推广
  • 网站建设后的心得非织梦做的网站能仿吗
  • 网站横幅怎做深圳网站建设制作企业
  • 企业网站用什么数据库网页升级紧急通知写作
  • 贵州建设水利厅考试网站长沙建设信息网站
  • 莱芜十七中网站中国临海门户网站工程建设
  • 开福区网站建设论坛专门做微信小程序的公司
  • 网站ui设计是什么百度seo指数查询
  • 网站主题模板美食电子商务网站建设规划书
  • 苏州那家公司做网站好广告设计培训班课程
  • 有没有个人网站精品资料网官方网站
  • 行业门户网站建设方案书帝国cms怎么做网站地图
  • 外贸网站 php网站开发私人培训
  • 企业建站公司流程四博互联做的网站
  • 做摄影网站的目的工商企业查询
  • 怎么建视频网站免费的定制家具网
  • 苏州网站制作及推广直接进入qq的网址
  • 网站建设中长出现的问题wordpress 修改文档目录名
  • 网站建设案例精粹 电子书传统文化传播公司网站建设
  • 网站添加悬浮二维码建设网站功能定位
  • 网站域名是什么意思网上申报系统
  • 赤峰建设厅官方网站建设摩托车官网报价及图片
  • 成都企业网站备案流程介绍旅游美食的网站模板免费下载
  • 企业首次建设网站的策划方案企业网站制作官网
  • 做电影网站要买什么吴江网站设计
  • 翻译国外网站做原创jsp 网站建设
  • 洛阳西工区做网站哪家好邯郸信息港首页
  • 工作站做网站互联网内容服务商有哪些