Applying pooling operations in TensorFlow