You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should check the input dimensionality and bail out earlier (both in LSTMLayer and GRULayer, maybe in others as well -- would be good to grep for np.prod and see if there are other instances that can fail in a similar fashion). Fixing this entails raising a ValueError for too small dimensionalities, and adding a test that checks whether the exception is raised correctly.
The text was updated successfully, but these errors were encountered:
When passing a two-dimensional input layer to LSTMLayer, it will break with an uninterpretable error message:
The reason is that
np.prod(())
returns1.0
as anumpy.float64
instance when computingnum_units
: https://github.com/Lasagne/Lasagne/blob/master/lasagne/layers/recurrent.py#L863We should check the input dimensionality and bail out earlier (both in
LSTMLayer
andGRULayer
, maybe in others as well -- would be good to grep fornp.prod
and see if there are other instances that can fail in a similar fashion). Fixing this entails raising aValueError
for too small dimensionalities, and adding a test that checks whether the exception is raised correctly.The text was updated successfully, but these errors were encountered: