在這個過程中如果遇到如下錯誤:
"This program takes in a trained network and an input data layer, and then"
" extract features of the input data produced by the net.\n"
"Usage: extract_features pretrained_net_param"
" feature_extraction_proto_file extract_feature_blob_name1[,name2,...]"
" save_feature_dataset_name1[,name2,...] num_mini_batches db_type"
" [CPU/GPU] [DEVICE_ID=0]\n"
"Note: you can extract multiple features in one pass by specifying"
" multiple feature blob names and dataset names separated by ','."
" The names cannot contain white space characters and the number of blobs"
" and datasets must be equal.";
表示參數不夠,檢查參數個數是否對。
其中上面的第5個參數,表示提取特徵數據的batch的數目,解釋下,網絡中我們的batch_size,表示一次提取特徵的圖片數,而batch就是總的圖片數除以batch_size取整即可。
即提取的特徵是batch_size的整數倍,如果圖片數不能整除batch_size網絡會自動從開始的圖片中自動補入。