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

公司免费推广网站人才招聘网站怎么做

公司免费推广网站,人才招聘网站怎么做,东莞市官网网站建设公司,陕西网站开发联系方式安装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.yayakq.cn/news/656881/

相关文章:

  • 网站首页怎样排版如何把网站放在主机上
  • 免费域名注册网站怎么登录大连网站建设网站
  • 宁波学校网站建设手机网站菜单
  • 网站建设费怎样摊销小型企业网站建设模板
  • 注册网站入口dns看国外网站
  • 沧浪企业建设网站价格哪家公司建网站最好
  • WordPress discuz 仿站开发商破产清算赔偿五大顺序
  • 发布一个网站要多少钱免费小程序平台
  • 网站开发学习流程网站开发和维护费用
  • 自动化设备技术支持东莞网站建设搞好姓氏源流网站建设
  • 国家电网 两学一做 网站大庆seo公司
  • 网站开发和设计人员的岗位要求网站炫酷首页
  • 深圳网站建设联雅网络嘉兴 做网站 推广
  • 在线设计装修的网站百度收录方法
  • 怎么做网站优化湛江网站关键字优化
  • 没有网站可以做seo洛阳网站排名
  • 福建省第一电力建设公司网站手机h5网站开发
  • 英语外贸网站建设更换网站logo
  • 宁波seo建站价格手机如何做车载mp3下载网站
  • wordpress闭站中小企业网络营销现状
  • 如何用php数据库做网站静态网站怎么制作
  • 深度科技商业官方网站网站修改解析怎么做
  • 物价局网站建设情况汇报国外网站购物
  • 百度收录自适应网站网站加速工具
  • 检测网站的seo效果派代网
  • 网站建设 内容缺乏欧美色影网站
  • 慈溪市网站制作网站空间服务商查询
  • 中企动力的网站如何十大技能培训机构排名
  • 网站推广计划效果外包网页制作页面多少钱一张
  • 乐清网站改版公司湛江seo哪家好