Skip to content

Commit

Permalink
Fixes to MUT1 layer + test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leif Johnson committed Aug 13, 2015
1 parent 0f55784 commit c151f1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/layers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def test_create(self):
self.assert_param_names(['bh', 'br', 'bz',
'hh', 'hr',
'xh', 'xr', 'xz'])
self.assert_count(84)
self.assert_count(68)

def test_transform(self):
out, upd = self.l.transform(dict(out=self.x))
Expand Down
5 changes: 2 additions & 3 deletions theanets/layers/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,8 @@ def fn(x_t, r_t, z_t, h_tm1):
(p, h, o), updates = self._scan(
fn,
[TT.tanh(TT.dot(x, self.find('xh'))) + self.find('bh'),
TT.dot(x, self.find('xr')) + self.find('br'),
z],
[None, None, None, x])
TT.dot(x, self.find('xr')) + self.find('br'), z],
[None, None, x])

# output is: (time, batch, output)
# we want: (batch, time, output)
Expand Down

0 comments on commit c151f1a

Please sign in to comment.