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
4 changes: 2 additions & 2 deletions bnn/nn/mixins/variational/ffg.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ def init_from_deterministic_params(self, param_dict):
@property
def weight_sd(self):
weight_sd = F.softplus(self._weight_sd)
return weight_sd if self.max_sd is None else weight_sd.clamp(0, self.max_sd)
return weight_sd.clamp(1e-5, self.max_sd)

@property
def bias_sd(self):
if self.has_bias:
bias_sd = F.softplus(self._bias_sd)
return bias_sd if self.max_sd is None else bias_sd.clamp(0, self.max_sd)
return bias_sd.clamp(1e-5, self.max_sd)
return None

@property
Expand Down