Make redundant features
argument optional for recurrent cells
#3717
Labels
Priority: P2 - no schedule
Best effort response and resolution. We have no plan to work on this at the moment.
For recurrent cells such as the following:
LSTMCell
GRUCell
MGUCell
SimpleCell
OptimizedLSTMCell
the
features
argument of the constructor is redundant: It can be inferred from thecarry
input to its__call__
method. (The only cell that currently usesself.features
in its__call__
method isConvLSTMCell
, which ought to be modified to infer it from itscarry
input.)For each cell, the only place where
self.features
is needed is in theinitialize_carry
method. But in many models, the initial carry comes from "upstream" in the model, so this method is never used.Proposal:
Edit
ConvLSTMCell
to inferfeatures
in its__call__
method from itscarry
input.Set
features=None
by default in each cell's constructor.Add the following line to each
initialize_carry
method:I can submit a PR for this, if desired.
An alternative would be to pass
features
directly to theinitialize_carry
method.The text was updated successfully, but these errors were encountered: