netural network building block,like Softmax,Sigmoid,MaxPool
checking Point operations,like save Restore
Queue and synchronization operations,like Enqueue,MutexAcquire
control flow operations,like Merge,Switch,Enter,NextIteration,Leave
四,Tensor DataType
tf.(b)float_(16/32/64)
tf.complex(64/128)
tf.uint(8/16)
tf.int(8/16/32/64)
bool
string
tf.qint(8/16/32)
tf.quint(8/16)
tf.resource
五,Tensor Varible
tf.variable()
tf.get_variable(name,shape,initicalizer)
initial all the variable at once
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
or
with tf.Session() as sess:
sess.run(tf.variables_initializer(name1,name2,...))
六,Traning phrase1
reading data
create placeholders for input and labels
create weight and bias
Y_predicted=wX+b
specify loss function:loss=tf.Square(Y-Y_predicted,name)
create optimizer:
opt=tf.train.GrandientDecentOptimizer(learning_rate=0.01)
optimizer=opt.minimize(loss)
or
optimizer=tf.train.GradientDecentOptimizer(learnint_rate=0.001).minimize(loss)
sess.run([optimizer,loss],feedDict={X:x,Y:y})