'Creates an initializer.
Args:
dims: Dimension(s) index to compute standard deviation:
sqrt(scale / product(shape[dims]))
scale: A constant scaling for the initialization used as
sqrt(scale / product(shape[dims])).
**kwargs: Extra keyword arguments to pass to tf.truncated_normal.'

def __init__(self, dims=(0,), scale=2.0, **kwargs):

    if isinstance(dims, (int, long)):
        self._dims = [dims]
    else:
        self._dims = dims
    self._kwargs = kwargs
    self._scale = scale
