def __init__(self,
               spatial_average='learnable',
               sequence='sc',
               out_init='glorot_uniform',
               out_act='identity', **kwargs):
    super(ConditionalLayerNorm, self).__init__(**kwargs)
    self.spatial_average = spatial_average
    self.sequence = sequence
    self.out_init = out_init
    self.out_act = out_act
    self.out_act_func = base_utils.act_to_func(out_act)
    if self.spatial_average not in ['mean', 'learnable']:
      raise ValueError('Expected spatial average to be "mean" or "learnable" ,'
                       'got %s' % self.spatial_average)
    if self.sequence not in ['sc', 'cs']:
      raise ValueError('Expected sequence to be "sc" or "cs" ,'
                       'got %s' % self.sequence)