TensorFlow官方教程学习笔记之1-TensorFlow入门教程(Getting Started With TensorFlow)

1.图基础(Graph basics)

节点(Nodes):图中”add”
边(Edges):对应三条线
这里写图片描述

2.TensorFlow中的计算图(Computation Graphs in TensorFlow)

所有TensorFlow工程由如下两个部分组成:
1)定义计算图(Define the computation graph)
2)运行图(Run the graph(with data))

3.建立第一个TensorFlow图(Building the frist TensorFlow graph)

代码

# coding: utf-8

# 
import tensorflow as tf

# Define the computation graph
a = tf.constant(5,name = "input_a")
b = tf.constant(3,name = "input_b")
c = tf.multiply(a,b,name = "mul")
d = tf.add(a,b,name = "add")
e = tf.add(c,d,name = "add")

# Run the graph(with data
sess = tf.Session()
sess.run(e)
sess.run(c)

# Graph
writer = tf.summary.FileWriter('./my_graph',sess.graph)

writer.close()
sess.close()

显示图

1)输入命令:

$tensorboard --logdir="test"

$tensorboard --logdir=./test

2)输入网址:
这里写图片描述
说明:加码部分为本地主机名(localhost)

3)最终显示:

这里写图片描述

参考资料

[1] TENSORFLOW FOR MACHINE INTELLIGENCE.pdf Chapter3. TensorFlow Fundamentals

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Key Features, Get the first book on the market that shows you the key aspects TensorFlow, how it works, and how to use it for the second generation of machine learning, Want to perform faster and more accurate computations in the field of data science? This book will acquaint you with an all-new refreshing library—TensorFlow!, Dive into the next generation of numerical computing and get the most out of your data with this quick guide, Book Description, Google's TensorFlow engine, after much fanfare, has evolved in to a robust, user-friendly, and customizable, application-grade software library of machine learning (ML) code for numerical computation and neural networks., This book takes you through the practical software implementation of various machine learning techniques with TensorFlow. In the first few chapters, you'll gain familiarity with the framework and perform the mathematical operations required for data analysis. As you progress further, you'll learn to implement various machine learning techniques such as classification, clustering, neural networks, and deep learning through practical examples., By the end of this book, you’ll have gained hands-on experience of using TensorFlow and building classification, image recognition systems, language processing, and information retrieving systems for your application., What you will learn, Install and adopt TensorFlow in your Python environment to solve mathematical problems, Get to know the basic machine and deep learning concepts, Train and test neural networks to fit your data model, Make predictions using regression algorithms, Analyze your data with a clustering procedure, Develop algorithms for clustering and data classification, Use GPU computing to analyze big data
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值