{"record":{"id":"e36ad9daf7984d0d","repo":"tensorflow/models","slug":"unsupported-activation-e36ad9","errorCode":null,"errorMessage":"Unsupported activation `{}`.","messagePattern":"Unsupported activation `(.+?)`\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/modeling/architecture/heads.py","lineNumber":323,"sourceCode":"      self._conv2d_op = functools.partial(\n          tf_keras.layers.SeparableConv2D,\n          depth_multiplier=1,\n          bias_initializer=tf.zeros_initializer())\n    else:\n      self._conv2d_op = functools.partial(\n          tf_keras.layers.Conv2D,\n          kernel_initializer=tf_keras.initializers.VarianceScaling(\n              scale=2, mode='fan_out', distribution='untruncated_normal'),\n          bias_initializer=tf.zeros_initializer())\n\n    self._num_fcs = num_fcs\n    self._fc_dims = fc_dims\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._conv_ops = []\n    self._conv_bn_ops = []\n    for i in range(self._num_convs):\n      self._conv_ops.append(\n          self._conv2d_op(\n              self._num_filters,\n              kernel_size=(3, 3),\n              strides=(1, 1),\n              padding='same',\n              dilation_rate=(1, 1),\n              activation=(None\n                          if self._use_batch_norm else self._activation_op),\n              name='conv_{}'.format(i)))\n      if self._use_batch_norm:\n        self._conv_bn_ops.append(self._norm_activation())","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/modeling/architecture/heads.py#L305-L341","documentation":"Error \"Unsupported activation `{}`.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/modeling/architecture/heads.py:323 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"}