How to make a global middle pool in TensorFlow? If I have a form tensor batch_size, height, width, channels = 32, 11, 40, 100, is it easy enough to use tf.layers.average_pooling2d(x, [11, 40], [11, 40])as long as channels = classes?
batch_size, height, width, channels = 32, 11, 40, 100
tf.layers.average_pooling2d(x, [11, 40], [11, 40])
You do not need to go a step. If padding = 'valid' (default), if the spatial scale of the combining filter matches the spatial extent of the image, you will get a 1x1 image. Besides, that’s how you do it, yes.
You can also do tf.reduce_mean (x, [1,2]) , especially if your height and width are not defined.
Source: https://habr.com/ru/post/1668873/More articles:Know the number of objects that can be serialized from a file - javaКак запустить приложение spring -boot перед запуском теста интеграции - mavenUnsuccessful TensorSliceReader constructor: could not find matching files for - tensorflowDagger 2: error about subcomponents, but I do not have any subcomponents in my application - androidHow to split a string using 2 separated parameters? - pythonWordcloud in R from a list of values (not from text documents) - rReferenceError: localStorage not defined in typescript Angular 2 - javascriptHow to create a custom directive that will wrap a template in other elements (Angular 2)? - angularHow to register in a specific folder in Google Drive API v3 PHP - phpLambda capture by value and the keyword "mutable" - c ++All Articles