added GlobalPoolLayer and a utility function to count the number of parameters of a model