tensorflow/models · error · ValueError
Unsupported pooling type {}.
Error message
Unsupported pooling type {}. What it means
Error "Unsupported pooling type {}." thrown in tensorflow/models.
Source
Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:262
def _pool2d(self, inputs, height, width, target_height, target_width):
"""Pools the inputs to target height and width."""
height_stride_size = int((height - 1) // target_height + 1)
width_stride_size = int((width - 1) // target_width + 1)
if self.pooling_type == 'max':
return tf_keras.layers.MaxPooling2D(
pool_size=[height_stride_size + 1, width_stride_size + 1],
strides=[height_stride_size, width_stride_size],
padding='SAME',
data_format=self.data_format)(
inputs)
if self.pooling_type == 'avg':
return tf_keras.layers.AveragePooling2D(
pool_size=[height_stride_size + 1, width_stride_size + 1],
strides=[height_stride_size, width_stride_size],
padding='SAME',
data_format=self.data_format)(
inputs)
raise ValueError('Unsupported pooling type {}.'.format(self.pooling_type))
def _upsample2d(self, inputs, target_height, target_width, training):
return resize(inputs, target_height, target_width, self.strategy, training,
self.upsampling_type)
def _maybe_apply_1x1(self, feat, training, num_channels):
"""Applies 1x1 conv to change layer width if necessary."""
target_num_channels = self.target_num_channels
if target_num_channels is None or num_channels != target_num_channels:
feat = self.conv2d(feat)
if self.apply_bn:
feat = self.bn(feat, training=training)
return feat
def build(self, feat_shape):
num_channels = self.target_num_channels or feat_shape[-1]
self.conv2d = tf_keras.layers.Conv2D(
num_channels, (1, 1),View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:262 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/e2d5c7c31b584e9d.
Report an issue: GitHub.