Skip to content

Commit

Permalink
fix indentation error on traininglayers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
richzhang committed Aug 10, 2016
1 parent b30ee0a commit 94b2a53
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions caffe-colorization
Submodule caffe-colorization added at 643147
20 changes: 9 additions & 11 deletions resources/caffe_traininglayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,15 @@ def backward(self, top, propagate_down, bottom):
bottom[i].diff[...] = np.zeros_like(bottom[i].data)

class ClassRebalanceMultLayer(caffe.Layer):
'''
INPUTS
bottom[0] NxMxXxY feature map
bottom[1] Nx1xXxY boost coefficients
OUTPUTS
top[0] NxMxXxY on forward, gets copied from bottom[0]
FUNCTIONALITY
On forward pass, top[0] passes bottom[0]
On backward pass, bottom[0] gets boosted by bottom[1]
through pointwise multiplication (with singleton expansion) '''
''' INPUTS
bottom[0] NxMxXxY feature map
bottom[1] Nx1xXxY boost coefficients
OUTPUTS
top[0] NxMxXxY on forward, gets copied from bottom[0]
FUNCTIONALITY
On forward pass, top[0] passes bottom[0]
On backward pass, bottom[0] gets boosted by bottom[1]
through pointwise multiplication (with singleton expansion) '''
def setup(self, bottom, top):
# check input pair
if len(bottom)==0:
Expand Down Expand Up @@ -250,7 +249,6 @@ def __init__(self,NN,sigma,km_filepath='',cc=-1):
self.alreadyUsed = False

def encode_points_mtx_nd(self,pts_nd,axis=1,returnSparse=False,sameBlock=True):
t = rz.Timer();
pts_flt = flatten_nd_array(pts_nd,axis=axis)
P = pts_flt.shape[0]
if(sameBlock and self.alreadyUsed):
Expand Down
Binary file modified resources/caffe_traininglayers.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion train/solver.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ base_lr: 3.16e-5
lr_policy: "step"
gamma: 0.316
stepsize: 215000
display: 100
display: 1
max_iter: 500000
momentum: 0.9
momentum2: 0.99
Expand Down

0 comments on commit 94b2a53

Please sign in to comment.