Shuhei Fujiwara
Shuhei Fujiwara

Reputation: 303

What is the essential difference between `tf.contrib.layers.max_pool2d` and `tf.nn.max_pool`?

I found two functions, tf.contrib.layers.max_pool2d and tf.nn.max_pool, for max pooling in TensorFlow.

tf.contrib.layers.max_pool2d seems to be a wrapper of tf.nn.max_pool, but I could not understand what is the advantage of using `tf.contrib.layers.max_pool2d.

What is the essential difference between tf.contrib.layers.max_pool2d and tf.nn.max_pool?

Resources:

Upvotes: 1

Views: 1258

Answers (1)

Lifu Huang
Lifu Huang

Reputation: 12778

Well, functionally, there is no "essential" difference between them, except for some minor differences between their signatures(ksize, strides, etc.)

But please pay attention, tf.contrib is an unstable collection of some high-level functions contributed from various sources, thus might be modified or even removed in future versions.

Upvotes: 3

Related Questions