摘要: 使用命令打开tensorboard,我这里是在log文件夹的上一级,注意在哪个文件夹使用命令 tensorboard --logdir=log 运行结果: TensorBoard 1.11.0 at http://DESKTOP-I0SJT3T:6006 (Press CTRL+C to quit) 阅读全文
posted @ 2020-02-18 23:19 搞点薯条 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 基本符号 代码: # -*- coding: UTF-8 -*- # 引入tensorflow import tensorflow as tf # 构造图(Graph)的结构 # 用一个线性方程的例子 y = W * x + b W = tf.Variable(2.0, dtype=tf.float 阅读全文
posted @ 2020-02-18 23:12 搞点薯条 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 代码: # -*- coding: UTF-8 -*- # 引入 TensorFlow import tensorflow as tf # 创建两个常量 Tensor,两个[]才是矩阵 const1 = tf.constant([[2, 2]]) const2 = tf.constant([[4], 阅读全文
posted @ 2020-02-18 21:33 搞点薯条 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 张量的维度(秩) tensor属性 tensor和numpy类似,具有类似的属性,例如: 数据类型dtpye 形状shape 几种tensor constant 值不能改变的一种tensor tf.constant( value, dtype=None, shape=None, name='Cons 阅读全文
posted @ 2020-02-18 20:48 搞点薯条 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 基础结构 数据流图 基础模型 会话(启动图) 程序流程 定义算法的计算图结构 使用会话执行计算 阅读全文
posted @ 2020-02-18 16:50 搞点薯条 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 编程模式 命令式编程(例如torch) 容易理解,命令语句基本没有优化,C、Java、C++、python a = 2 b = 3 c = a * b d = c + 1 print(d) 符号式编程(例如tensorflow) 涉及较多的嵌入和优化,运行速度有同比提升 import tensorf 阅读全文
posted @ 2020-02-18 15:39 搞点薯条 阅读(140) 评论(0) 推荐(0) 编辑