def register_optimizer(name, opt):
 if (name in predefined_optimizers):
  raise ValueError(('Optimizer name already taken: %s' % name))
 predefined_optimizers[name] = opt

def register_optimizer ( name , opt ) : if ( name in predefined_optimizers ) : raise ValueError ( ( 'Optimizer name already taken: %s' % name ) ) predefined_optimizers [ name ] = opt
add a optimizer which can be referred to by name in mode .