Tensorflow简介
什么是Tensorflow
Tensorflow的特点
Tensorflow发展历史
Tensorflow安装
pip3 install tensorflow==1.2.0
tensorflow版本的helloworld
# tensorflow版本的helloworld
import tensorflow as tf
hello = tf.constant("Hello world!") # 定义一个常量(张量)
sess = tf.Session() # 创建一个session,用来执行操作
print(sess.run(hello)) # 调用session的run方法,执行hello操作,并打印结果
sess.close() # 关闭session
张量相加
#常量加法运算示例
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
a = tf.constant(5.0)
b = tf.constant(1.0)
c = tf.add(a,b)
with tf.Session() as sess:
print(sess.run(c))
Tensorflow体系结构
体系结构概述
单机模式和分布式模式
后端逻辑层次
基本概念
数据流
操作
图和会话
变量和占位符