Fixed a bug on the number of weights in each layer.