def avg_pool_3d(incoming, kernel_size, strides=None, padding='same', name='AvgPool3D'):
 input_shape = utils.get_incoming_shape(incoming)
 assert (len(input_shape) == 5), 'Incoming Tensor shape must be 5-D'
 kernel = utils.autoformat_kernel_3d(kernel_size)
 strides = utils.autoformat_stride_3d(strides)
 padding = utils.autoformat_padding(padding)
 with tf.name_scope(name) as scope:
  inference = tf.nn.avg_pool3d(incoming, kernel, strides, padding)
  tf.add_to_collection(tf.GraphKeys.ACTIVATIONS, inference)
 inference.scope = scope
 tf.add_to_collection(((tf.GraphKeys.LAYER_TENSOR + '/') + name), inference)
 return inference

def avg_pool_3d ( incoming , kernel_size , strides = None , padding = 'same' , name = 'AvgPool3D' ) : input_shape = utils . get_incoming_shape ( incoming ) assert ( len ( input_shape ) == 5 ) , 'Incoming Tensor shape must be 5-D' kernel = utils . autoformat_kernel_3d ( kernel_size ) strides = utils . autoformat_stride_3d ( strides ) padding = utils . autoformat_padding ( padding ) with tf . name_scope ( name ) as scope : inference = tf . nn . avg_pool3d ( incoming , kernel , strides , padding ) tf . add_to_collection ( tf . GraphKeys . ACTIVATIONS , inference ) inference . scope = scope tf . add_to_collection ( ( ( tf . GraphKeys . LAYER_TENSOR + '/' ) + name ) , inference ) return inference
average pooling 3d .