Skip to content

Commit

Permalink
Lstm, remove rec_weight_dropout option
Browse files Browse the repository at this point in the history
We will handle that in a more generic way (#59).
  • Loading branch information
albertz committed Nov 5, 2021
1 parent acfad48 commit a570838
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions nn/rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,5 @@ class Lstm(_Rec):
"""
LSTM
"""
def __init__(self, n_out: int, *, rec_weight_dropout=0, rec_weight_dropout_shape=None, **kwargs):
assert "unit_opts" not in kwargs, "we handle that here"
unit_opts = {}
if rec_weight_dropout:
unit_opts["rec_weight_dropout"] = rec_weight_dropout
if rec_weight_dropout_shape:
unit_opts["rec_weight_dropout_shape"] = rec_weight_dropout_shape
if unit_opts:
kwargs = kwargs.copy()
kwargs["unit_opts"] = unit_opts
def __init__(self, n_out: int, **kwargs):
super().__init__(n_out=n_out, unit="nativelstm2", **kwargs)

0 comments on commit a570838

Please sign in to comment.