摘要:
import tensorflow as tf import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' # 变量也是一种OP,是一种特殊的张量,能够进行持久化的存储,它的值就是张量,默认被训练 var1 = tf.Variable(tf.random_nor 阅读全文
posted @ 2020-03-30 12:36
kog_maw
阅读(143)
评论(0)
推荐(0)
摘要:
import tensorflow as tf # 生成全为0的张量 zero = tf.zeros([3, 5], tf.float32) # 生成全为1的张量 ones = tf.ones([3, 5], tf.float32) # [2, 3]两行三列,生成随机值张量,mean平均值,stdd 阅读全文
posted @ 2020-03-30 12:32
kog_maw
阅读(397)
评论(0)
推荐(0)
摘要:
# 张量(tensor)是对数组进行封装后的一种数据类型,三部分,名字,形状,数据类型 # 张量的阶对应着数组的维度 # 张量常用的数据类型:tf.float32,tf.int32,tf.string,tf.bool等 # 张量的属性:graph(张量所属的默认图),op(张量的操作名),name( 阅读全文
posted @ 2020-03-30 12:20
kog_maw
阅读(148)
评论(0)
推荐(0)
摘要:
import tensorflow as tf ''' TensorFlow分为前端系统和后端系统 前端系统:定义程序的图和结构,即各类语言通过API接口写的程序 后端系统:运算图的结果 会话:即连接前后端的中间者,起到调度资源的效果 运行图结构 分配计算资源 掌握资源(队列,线程,变量的资源) ' 阅读全文
posted @ 2020-03-30 12:14
kog_maw
阅读(194)
评论(0)
推荐(0)
摘要:
import tensorflow as tf import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' # 修改TensorFlow警告信息级别 # 创建一张图包含了op和tensor,使用图是在上下文环境中的 # op:只要用TensorFlow的API定 阅读全文
posted @ 2020-03-30 11:50
kog_maw
阅读(110)
评论(0)
推荐(0)

浙公网安备 33010602011771号