Skip to content

Commit

Permalink
Fix MODEL_FILE route for files other than face12c_full_conv
Browse files Browse the repository at this point in the history
  • Loading branch information
anson0910 committed Nov 11, 2015
1 parent 6be986b commit a511546
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions face_net_surgery/list_all_quantize_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
sys.path.insert(0, caffe_root + 'python')
import caffe
# =================================================================================
modelDirList = ['face_12c']
modelNameList = ['face12c_full_conv']
modelDirList = ['face_12c', 'face_12_cal']
modelNameList = ['face12c_full_conv', 'face_12_cal']

for curModel in range(len(modelDirList)):
for quantize_bit_num in range(3, 10):

file_write = open(modelNameList[curModel] + '_quantize_' + str(quantize_bit_num) + '_params.txt', 'w')
file_write = open('./params/' + modelNameList[curModel] + '_quantize_'
+ str(quantize_bit_num) + '_params.txt', 'w')
sys.stdout = file_write
# ================== load face12c_full_conv ======================================
MODEL_FILE = '/home/anson/caffe-master/models/' \
+ modelDirList[curModel] + '/' + modelNameList[curModel] + '.prototxt'
if curModel == 0:
MODEL_FILE = '/home/anson/caffe-master/models/' \
+ modelDirList[curModel] + '/' + modelNameList[curModel] + '.prototxt'
else:
MODEL_FILE = '/home/anson/caffe-master/models/' \
+ modelDirList[curModel] + '/' + 'deploy.prototxt'
PRETRAINED = '/home/anson/caffe-master/models/' \
+ modelDirList[curModel] + '/' + modelNameList[curModel] + '_quantize_' \
+ str(quantize_bit_num) + '.caffemodel'
Expand Down

0 comments on commit a511546

Please sign in to comment.