'Initialize an array
Parameters
desc : InitDesc
Initialization pattern descriptor.
arr : NDArray
The array to be initialized.'

def __call__(self, desc, arr):

    if (not isinstance(desc, InitDesc)):
        self._legacy_init(desc, arr)
        return
    if (desc.global_init is None):
        desc.global_init = self
    init = desc.attrs.get('__init__', '')
    if init:
        create(init)._init_weight(desc, arr)
        self._verbose_print(desc, init, arr)
    elif desc.endswith('weight'):
        self._init_weight(desc, arr)
        self._verbose_print(desc, 'weight', arr)
    elif desc.endswith('bias'):
        self._init_bias(desc, arr)
        self._verbose_print(desc, 'bias', arr)
    elif desc.endswith('gamma'):
        self._init_gamma(desc, arr)
        self._verbose_print(desc, 'gamma', arr)
    elif desc.endswith('beta'):
        self._init_beta(desc, arr)
        self._verbose_print(desc, 'beta', arr)
    else:
        self._init_default(desc, arr)
