Note - Tensorflow Machine Learning Cookbook
Tensorflow work flow
Import or generate datasets
Transfer and normalize data 转换与归一化
data=tf.nn.batch_norm_with_global_normalization(..)
Partition datasets into train,test,validation sets
程序运行所需要的全局常量
param learning_rate = 0.01 batch_size=100 iterations=1000
Set algorithm parameters(hyperparameters)
Initialize variables and placeholders
Define Model Structure
with tf.Session(graph=graph) as session: seesion.run()
Declare the loss function
#
it is very important that it tell us how far off our prediction are from the actual value. loss=tf.reduce_mean(tf.square(y-acture - y-predit))
Initialize and train the model
Evaluate the model
Turn hyperparameters
Deploy/predict new outcome