Skip to content

Commit

Permalink
Change aperture
Browse files Browse the repository at this point in the history
  • Loading branch information
nschaetti committed Jan 29, 2019
1 parent a122411 commit 00a1fa3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions echotorch/nn/Conceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ def quota(self):
# PUBLIC
###############################################

# Change aperture
def set_aperture(self, new_a):
"""
Change aperture
:param new_a:
:return:
"""
# Conceptor matrix
c = self.w_out.clone()

# New tensor
self.w_out = c.mm(torch.inverse(c + torch.pow(new_a / self.aperture, -2) * (torch.eye(self.conceptor_dim) - c)))
# end set_aperture

# Output matrix
def get_C(self):
"""
Expand Down

0 comments on commit 00a1fa3

Please sign in to comment.