Tensorflow实践

确定文件的编码格式

# -*- coding : utf-8 -*-

引入tensorflow库

import tensorflow as tf

定义常量

hw=tf.contant("hellow")

创建一个tensorflow的session

sess=tf.Session()

运行一个计算图

print tf.run(hw)

关闭回话

tf.close()

tensorflow是符号式编程

 

服务端运算结果和客户端

session可以启动图的一部分 

 

 

tensor的数据类型 和 numpy的数据类型形似

tensor不会运算结果

必须op session

tf.Constant

tf.Variable

tf.train下大都是优化器,优化器optinizer

学习率  步长  切线(太大可能会跨过最小值的点)

激活函数:增加非线性

tf.layer.conv2d

原文地址:https://www.cnblogs.com/BlueFire-py/p/9885514.html