def has_hidden(layer):
 return hasattr(layer, 'initial_hidden_state')

def has_hidden ( layer ) : return hasattr ( layer , 'initial_hidden_state' )
whether a layer has a trainable initial hidden state .