tensorflow實戰(黃文堅 唐源) 學習筆記1--LeNet5
sift演算法(傳統)
尺度不變特徵轉換(Scale-invariant feature transform或SIFT)是一種電腦視覺的演算法用來偵測與描述影像中的區域性性特徵,它在空間尺度中尋找極值點,並提取出其位置、尺度、旋轉不變數,此演算法由 David Lowe在1999年所發表,2004年完善總結。
SIFT演算法在一定程度上可解決:
目標的旋轉、縮放、平移(RST)
影象仿射/投影變換(視點viewpoint)
光照影響(illumination)
目標遮擋(occlusion)
雜物場景(clutter)
LRN (在 relu後使用,解決sigmoid梯度消失)
LRN層(local response normalization),對區域性神經元的活動建立競爭機制,使得其中響應比較大的值變得相對更大,並抑制其他反饋較小的神經元,增強了模型的泛化能力。
函式:tf.nn.lrn(input,depth_radius=None,bias=None,alpha=None,beta=None,name=None)
session 和 interactiveSession 不同
使用InteractiveSession一個主要的變化是:執行在沒有指定會話物件的情況下執行變數。這是與Session()最大的不同。
tf.InteractiveSession():它能讓你在執行圖的時候,插入一些計算圖,這些計算圖是由某些操作(operations)構成的。這對於工作在互動式環境中的人們來說非常便利,比如使用IPython。
tf.Session():需要在啟動session之前構建整個計算圖,然後啟動該計算圖。
意思就是在我們使用tf.InteractiveSession()來構建會話的時候,我們可以先構建一個session然後再定義操作(operation),如果我們使用tf.Session()來構建會話我們需要在會話構建之前定義好全部的操作(operation)然後再構建會話。
use git
建立完 repository
cd *** git init git add *** git commit -m "first commit" git remote add origin https://github.com/gravitychen/repository_name.git git push -u origin master (之後用) git push -u origin master git push -u origin master git push -u origin master git push -u origin master