{"record":{"id":"15bf1c6165442921","repo":"tensorflow/models","slug":"unsupported-activation-15bf1c","errorCode":null,"errorMessage":"Unsupported activation `{}`.","messagePattern":"Unsupported activation `(.+?)`\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/modeling/architecture/resnet.py","lineNumber":56,"sourceCode":"      norm_activation=nn_ops.norm_activation_builder(activation='relu'),\n      data_format='channels_last'):\n    \"\"\"ResNet initialization function.\n\n    Args:\n      resnet_depth: `int` depth of ResNet backbone model.\n      activation: the activation function.\n      norm_activation: an operation that includes a normalization layer followed\n        by an optional activation layer.\n      data_format: `str` either \"channels_first\" for `[batch, channels, height,\n        width]` or \"channels_last for `[batch, height, width, channels]`.\n    \"\"\"\n    self._resnet_depth = resnet_depth\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._norm_activation = norm_activation\n    self._data_format = data_format\n\n    model_params = {\n        10: {\n            'block': self.residual_block,\n            'layers': [1, 1, 1, 1]\n        },\n        18: {\n            'block': self.residual_block,\n            'layers': [2, 2, 2, 2]\n        },\n        34: {\n            'block': self.residual_block,\n            'layers': [3, 4, 6, 3]\n        },\n        50: {\n            'block': self.bottleneck_block,","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/modeling/architecture/resnet.py#L38-L74","documentation":"Error \"Unsupported activation `{}`.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/detection/modeling/architecture/resnet.py:56 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"}