Update recurrent.py
trying to edit directly from the browser
This commit is contained in:
parent
4ab6a520c9
commit
c678bdb3ae
@ -79,10 +79,10 @@ class StackedRNNCells(Layer):
|
||||
|
||||
def __init__(self, cells, **kwargs):
|
||||
for cell in cells:
|
||||
if not hasattr(cell, 'call'):
|
||||
if not 'call' in dir(cell):
|
||||
raise ValueError('All cells must have a `call` method. '
|
||||
'received cells:', cells)
|
||||
if not ('state_size' in dir(cell) or hasattr(cell, 'state_size')):
|
||||
if not 'state_size' in dir(cell):
|
||||
raise ValueError('All cells must have a '
|
||||
'`state_size` attribute. '
|
||||
'received cells:', cells)
|
||||
|
Loading…
x
Reference in New Issue
Block a user