Update recurrent.py
This commit is contained in:
parent
c678bdb3ae
commit
409db98338
@ -388,10 +388,10 @@ class RNN(Layer):
|
||||
**kwargs):
|
||||
if isinstance(cell, (list, tuple)):
|
||||
cell = StackedRNNCells(cell)
|
||||
if not hasattr(cell, 'call'):
|
||||
if not 'call' in dir(cell):
|
||||
raise ValueError('`cell` should have a `call` method. '
|
||||
'The RNN was passed:', cell)
|
||||
if not ('state_size' in dir(cell) or hasattr(cell, 'state_size')):
|
||||
if not 'state_size' in dir(cell):
|
||||
raise ValueError('The RNN cell should have '
|
||||
'an attribute `state_size` '
|
||||
'(tuple of integers, '
|
||||
|
Loading…
x
Reference in New Issue
Block a user