code: func (p *Pooling) OutputShape(input *TensorDescriptor, dims int) (retVal []int, err error) {
  	if dims == p.outDims && shapeEq(input.shape, p.inputTensor) {
  		return cloneShape(p.outputShape), nil
  	}
  	return p.CalcOutputShape(input, dims)
  }
docs: // OutputShape computes the output shape given the input tensor.
  //
  // This method caches the outputShape. If a inputTensor is seen before, and the dims is exactly the same, then the cached output shape is used