0

Very similar to this question but for average pooling.

The accpeted answer says, that same pooling uses -inf as padding for maxpooling. But what is used for average pooling. Do they use just 0?

relot
  • 651
  • 1
  • 6
  • 18

1 Answers1

0

Ok I just testef it out myself.

np.set_printoptions(threshold=np.nan)
x = np.array([[[3.0,3.0,3.0],[3.0,3.0,3.0]]])
x = x.reshape(1,2,3,1)
sess = tf.Session()
K.set_session(sess)
b = K.constant(x)
b = AveragePooling2D(pool_size=(2, 2), padding="same")(b)
b = tf.Print(b,[b])
sess.run(b)

This returns the tensor [[[[3][3]]]] so it has to pad with 0.

relot
  • 651
  • 1
  • 6
  • 18