Skip to content

Commit

Permalink
NAC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vrxacs committed Aug 31, 2018
1 parent 5f1d411 commit e2b122c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nalu/__init__.py
@@ -1,4 +1,4 @@
__version__ = '0.0.2'
__version__ = '0.0.3'

from .core import *
from .layers import *
6 changes: 3 additions & 3 deletions nalu/core/nac_cell.py
Expand Up @@ -19,9 +19,9 @@ def __init__(self, in_shape, out_shape):
self.out_shape = out_shape
self.W_ = Parameter(Tensor(out_shape, in_shape))
self.M_ = Parameter(Tensor(out_shape, in_shape))
self.W = Parameter(tanh(self.W_) * sigmoid(self.M_))
xavier_uniform_(self.W_), xavier_uniform_(self.M_)
self.register_parameter('bias', None)

def forward(self, input):
return linear(input, self.W, self.bias)
def forward(self, input):
W = tanh(self.W_) * sigmoid(self.M_)
return linear(input, W, self.bias)

0 comments on commit e2b122c

Please sign in to comment.