def get_lr_scalers_from_layers(owner):
 rval = OrderedDict()
 params = owner.get_params()
 for layer in owner.layers:
  contrib = layer.get_lr_scalers()
  assert isinstance(contrib, OrderedDict)
  assert (not any([(key in rval) for key in contrib]))
  assert all([(key in params) for key in contrib])
  rval.update(contrib)
 assert all([isinstance(val, float) for val in rval.values()])
 return rval

def get_lr_scalers_from_layers ( owner ) : rval = OrderedDict ( ) params = owner . get_params ( ) for layer in owner . layers : contrib = layer . get_lr_scalers ( ) assert isinstance ( contrib , OrderedDict ) assert ( not any ( [ ( key in rval ) for key in contrib ] ) ) assert all ( [ ( key in params ) for key in contrib ] ) rval . update ( contrib ) assert all ( [ isinstance ( val , float ) for val in rval . values ( ) ] ) return rval
get the learning rate scalers for all member layers of owner .