tensorflow/models · error · ValueError
Unsupported act_type {}
Error message
Unsupported act_type {} What it means
Error "Unsupported act_type {}" thrown in tensorflow/models.
Source
Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:40
import tensorflow as tf, tf_keras
from official.projects.edgetpu.vision.modeling import common_modules
def activation_fn(features: tf.Tensor, act_type: Text):
"""Customized non-linear activation type."""
if act_type in ('silu', 'swish'):
return tf.nn.swish(features)
elif act_type == 'swish_native':
return features * tf.sigmoid(features)
elif act_type == 'hswish':
return features * tf.nn.relu6(features + 3) / 6
elif act_type == 'relu':
return tf.nn.relu(features)
elif act_type == 'relu6':
return tf.nn.relu6(features)
else:
raise ValueError('Unsupported act_type {}'.format(act_type))
def build_batch_norm(is_training_bn: bool,
beta_initializer: Text = 'zeros',
gamma_initializer: Text = 'ones',
data_format: Text = 'channels_last',
momentum: float = 0.99,
epsilon: float = 1e-3,
strategy: Optional[Text] = None,
name: Text = 'tpu_batch_normalization'):
"""Builds a batch normalization layer.
Args:
is_training_bn: `bool` for whether the model is training.
beta_initializer: `str`, beta initializer.
gamma_initializer: `str`, gamma initializer.
data_format: `str` either "channels_first" for `[batch, channels, height,
width]` or "channels_last for `[batch, height, width, channels]`.View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/edgetpu/vision/modeling/heads/bifpn_head.py:40 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/286f810fba3ee08c.
Report an issue: GitHub.