{"record":{"id":"7d48995fa81d08dd","repo":"tensorflow/models","slug":"unsupported-activation","errorCode":null,"errorMessage":"Unsupported activation `{}`.","messagePattern":"Unsupported activation `(.+?)`\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/modeling/architecture/fpn.py","lineNumber":73,"sourceCode":"      activation: the activation function.\n      use_batch_norm: 'bool', indicating whether batchnorm layers are added.\n      norm_activation: an operation that includes a normalization layer\n        followed by an optional activation layer.\n    \"\"\"\n    self._min_level = min_level\n    self._max_level = max_level\n    self._fpn_feat_dims = fpn_feat_dims\n    if use_separable_conv:\n      self._conv2d_op = functools.partial(\n          tf_keras.layers.SeparableConv2D, depth_multiplier=1)\n    else:\n      self._conv2d_op = tf_keras.layers.Conv2D\n    if activation == 'relu':\n      self._activation_op = tf.nn.relu\n    elif activation == 'swish':\n      self._activation_op = tf.nn.swish\n    else:\n      raise ValueError('Unsupported activation `{}`.'.format(activation))\n    self._use_batch_norm = use_batch_norm\n    self._norm_activation = norm_activation\n\n    self._norm_activations = {}\n    self._lateral_conv2d_op = {}\n    self._post_hoc_conv2d_op = {}\n    self._coarse_conv2d_op = {}\n    for level in range(self._min_level, self._max_level + 1):\n      if self._use_batch_norm:\n        self._norm_activations[level] = norm_activation(\n            use_activation=False, name='p%d-bn' % level)\n      self._lateral_conv2d_op[level] = self._conv2d_op(\n          filters=self._fpn_feat_dims,\n          kernel_size=(1, 1),\n          padding='same',\n          name='l%d' % level)\n      self._post_hoc_conv2d_op[level] = self._conv2d_op(\n          filters=self._fpn_feat_dims,","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/modeling/architecture/fpn.py#L55-L91","documentation":"Error \"Unsupported activation `{}`.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/modeling/architecture/fpn.py:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}