Skip to content

Commit

Permalink
Add mean_field_from_activation for SoftmaxUnits.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvtulder committed Mar 25, 2013
1 parent 518c1bb commit 905969d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions morb/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def probabilities(self, vmap):
def sample_from_activation(self, vmap):
p = self.probabilities_from_activation(vmap)
return samplers.multinomial(p)

def mean_field_from_activation(self, vmap):
return self.probabilities_from_activation(vmap)


class SoftmaxWithZeroUnits(Units):
Expand Down

0 comments on commit 905969d

Please sign in to comment.