Skip to content

Commit

Permalink
No bias with Conceptor and the possibility to set matrix from constru…
Browse files Browse the repository at this point in the history
…ctor.
  • Loading branch information
nschaetti committed Jan 29, 2019
1 parent 083fc13 commit e2e281c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions echotorch/nn/Conceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Conceptor(RRCell):
"""

# Constructor
def __init__(self, conceptor_dim, aperture=0.0, with_bias=True, learning_algo='inv', name=""):
def __init__(self, conceptor_dim, aperture=0.0, with_bias=False, learning_algo='inv', name="", conceptor_matrix=None):
"""
Constructor
:param input_dim: Inputs dimension.
Expand All @@ -50,6 +50,10 @@ def __init__(self, conceptor_dim, aperture=0.0, with_bias=True, learning_algo='i
self.conceptor_dim = conceptor_dim
self.aperture = aperture
self.name = name
if conceptor_matrix is not None:
self.w_out = conceptor_matrix
self.train(False)
# end if
# end __init__

###############################################
Expand Down Expand Up @@ -122,7 +126,6 @@ def E_plus(self, x):
:param x: states (x)
:return:
"""
x = x.unsqueeze(0)
return x.mm(self.w_out).mm(x.t())
# end E_plus

Expand Down

0 comments on commit e2e281c

Please sign in to comment.