=None, **kwargs
)
这个strides在默认的情况下就是步长为2 下面看个例子:
import tensorflow as tf
x = tf.random.normal((4,28,28,3...改成1:
import tensorflow as tf
x = tf.random.normal((4,28,28,3))
y = tf.keras.layers.MaxPooling2D(...pool_size=(2,2),
strides = 1)
print(y(x).shape)
>>> (4, 27, 27, 3)
如果再把padding改成‘same’:
import tensorflow...看一个例子:
import tensorflow as tf
x = tf.random.normal((4,28,28,3))
y = tf.keras.layers.GlobalMaxPooling2D...这里需要注意的一点是,keras的API中并没有像PyTorch的API中的这个参数group,这样的话,就无法衍生成GN和InstanceN层了,在之后的内容,会在Tensorflow_Addons库中介绍