Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions pylearn2/models/dbm/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,7 @@ class GaussianVisLayer(VisibleLayer):
locations, ie mu should be a vector with one elem per channel
bias_from_marginals : WRITEME
beta_lr_scale : WRITEME
mu_lr_scale : WRITEME
axes : tuple
WRITEME
"""
Expand All @@ -2061,6 +2062,7 @@ def __init__(self,
tie_mu = None,
bias_from_marginals = None,
beta_lr_scale = 'by_sharing',
mu_lr_scale = 'by_sharing',
axes = ('b', 0, 1, 'c')):
super(type(self), self).__init__()

Expand Down Expand Up @@ -2164,12 +2166,17 @@ def get_lr_scalers(self):
rval[self.beta] = self.beta_lr_scale

assert self.tie_mu in [None, 'locations']
if self.tie_mu == 'locations':
warn = True
assert self.nvis is None
rval[self.mu] = 1./num_loc
logger.warning("mu lr_scaler hardcoded to 1/sharing")

if self.mu_lr_scale == 'by_sharing':
if self.tie_mu == 'locations':
assert self.nvis is None
warn = True
rval[self.mu] = 1. / num_loc
logger.warning("mu lr_scaler hardcoded to 1/sharing")
elif self.mu_lr_scale == None:
pass
else:
rval[self.mu] = self.mu_lr_scale

return rval

@functools.wraps(Model._modify_updates)
Expand Down