def get_param_list(layer_list):
 plist = []
 for l in layer_list:
  ptuple = l.get_params()
  (plist.extend(ptuple) if isinstance(ptuple, list) else plist.append(ptuple))
 return plist

def get_param_list ( layer_list ) : plist = [ ] for l in layer_list : ptuple = l . get_params ( ) ( plist . extend ( ptuple ) if isinstance ( ptuple , list ) else plist . append ( ptuple ) ) return plist
returns a flattened list of parameters .