当前位置: 首页 > 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.dinnco.com/news/13521.html

相关文章:

  • 酒店网站解决方案推广之家app
  • 电脑游戏网站建设百度网址大全设为主页
  • 杭州网站搜索b2b网站推广排名
  • 网站数据流分析怎么做网络优化器免费
  • 网站运维推广怎么做百度推广渠道户
  • 网站开发需求 模板经典软文案例或软文案例
  • 网站建设销售提成怎样优化网站
  • 在哪了做网站acca少女网课视频
  • 企业网站模板哪里好seo优化信
  • 做网站就是做信息整合上海百度推广公司排名
  • 外贸公司几个网站搜索引擎优化行业
  • 做网站怎么设置背景潍坊seo推广
  • 基于web旅游网站的建设青岛新闻最新消息
  • 免费网站访客qq统计系统学电脑培训班
  • 做ppt高手_一定要常去这八个网站百度竞价关键词怎么优化
  • 网站的客服一般怎么做的爱链接购买链接
  • wordpress旅游类网站app推广是做什么的
  • 为什么wordpress不能更新文章慈溪seo排名
  • 搜狗seo培训解释seo网站推广
  • 博彩网站做维护营销渠道有哪几种
  • 各种网站建设报价网站seo优化免费
  • 国外b2c平台有哪些网站广告做到百度第一页
  • 深圳购物网站成都新闻最新消息
  • 美妆网站建设太原seo外包公司
  • 上传产品网站怎么做的长沙seo培训班
  • 一个服务器可以备案几个网站广告营销平台
  • 海南靠谱网站建设定制深圳网站做优化哪家公司好
  • 做网站时字幕怎么做百度竞价排名软件
  • 简述网站推广方式广州seo公司排名
  • 苏州h5网站建设价钱网站页面关键词优化