'Initializes weights and layers.
Args:
component: Parent ComponentBuilderBase object.'

def __init__(self, component):

    super(SplitNetwork, self).__init__(component)
    parameters = component.spec.network_unit.parameters
    self._num_slices = int(parameters['num_slices'])
    check.Gt(self._num_slices, 0, 'Invalid    number    of    slices.')
    check.Eq((self._concatenated_input_dim % self._num_slices), 0, ('Input    dimension    %s    does    not    evenly    divide    into    %s    slices' % (self._concatenated_input_dim, self._num_slices)))
    self._slice_dim = int((self._concatenated_input_dim / self._num_slices))
    for slice_index in xrange(self._num_slices):
        self._layers.append(Layer(self, ('slice_%s' % slice_index), self._slice_dim))
