{"record":{"id":"34b198be9a05b381","repo":"tensorflow/models","slug":"activation-not-implemented-34b198","errorCode":null,"errorMessage":"Activation {} not implemented.","messagePattern":"Activation (.+?) not implemented\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/modeling/backbones/spinenet.py","lineNumber":233,"sourceCode":"\n    net = self._build_stem(inputs=inputs)\n    input_width = input_specs.shape[2]\n    if input_width is None:\n      max_stride = max(map(lambda b: b.level, self._block_specs))\n      input_width = 2 ** max_stride\n    net = self._build_scale_permuted_network(net=net, input_width=input_width)\n    endpoints = self._build_endpoints(net=net)\n\n    self._output_specs = {l: endpoints[l].get_shape() for l in endpoints}\n    super(SpineNet, self).__init__(inputs=inputs, outputs=endpoints)\n\n  def _set_activation_fn(self, activation):\n    if activation == 'relu':\n      self._activation_fn = tf.nn.relu\n    elif activation == 'swish':\n      self._activation_fn = tf.nn.swish\n    else:\n      raise ValueError('Activation {} not implemented.'.format(activation))\n\n  def _block_group(self,\n                   inputs: tf.Tensor,\n                   filters: int,\n                   strides: int,\n                   block_fn_cand: str,\n                   block_repeats: int = 1,\n                   stochastic_depth_drop_rate: Optional[float] = None,\n                   name: str = 'block_group'):\n    \"\"\"Creates one group of blocks for the SpineNet model.\"\"\"\n    block_fn_candidates = {\n        'bottleneck': nn_blocks.BottleneckBlock,\n        'residual': nn_blocks.ResidualBlock,\n    }\n    block_fn = block_fn_candidates[block_fn_cand]\n    _, _, _, num_filters = inputs.get_shape().as_list()\n\n    if block_fn_cand == 'bottleneck':","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/modeling/backbones/spinenet.py#L215-L251","documentation":"Error \"Activation {} not implemented.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/modeling/backbones/spinenet.py:233 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported activation such as 'relu' or 'swish' in the SpineNet config.","Check the activation name for typos."],"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"}