'Gets the size of the given named layer of the network.
Args:
layer_name: string name of layer to look update
Returns:
the size of the layer.
Raises:
KeyError: if the layer_name to look up doesn\'t exist.'

def get_layer_size(self, layer_name):

    for layer in self.layers:
        if (layer.name == layer_name):
            return layer.dim
    raise KeyError('Layer    {}    not    found    in    component    {}'.format(layer_name, self._component.name))
