Skip to content

Commit

Permalink
Update net.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yihui He 何宜晖 authored Oct 1, 2017
1 parent 78a8bf5 commit e146524
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def __init__(self, pt, model=None, phase = caffe.TEST, noTF=1, accname=None, gt_
self.gt_net.copy_from(gt_model)
self._points_dict_name = cfgs._points_dict_name
if 0: self.show_acc('init')
"""stores pruned values, which will be saved to caffemodel later (since Net couldn't be dynamically changed)"""
self.WPQ={}
self.nonWPQ = {}
self.bottoms2ch = []
Expand Down Expand Up @@ -957,9 +958,7 @@ def finalmodel(self, WPQ=None, **kwargs):
return self.linear(WPQ, **kwargs)

def infer_pad_kernel(self, W, origin_name):
num_output = W.shape[0]
kernel_h = W.shape[2]
kernel_w = W.shape[3]
num_output, _, kernel_h, kernel_w = W.shape
assert kernel_h in [3,1]
assert kernel_w in [3,1]
pad_h = 1 if kernel_h == 3 else 0
Expand Down

0 comments on commit e146524

Please sign in to comment.