def _get_initializers(initializers, fields):
 result = {}
 for f in fields:
  if isinstance(initializers, dict):
   if (f in initializers):
    result[f] = _convert_to_initializer(initializers[f])
  else:
   result[f] = _convert_to_initializer(initializers)
 return result

def _get_initializers ( initializers , fields ) : result = { } for f in fields : if isinstance ( initializers , dict ) : if ( f in initializers ) : result [ f ] = _convert_to_initializer ( initializers [ f ] ) else : result [ f ] = _convert_to_initializer ( initializers ) return result
produces a nn initialization dict .