{"record":{"id":"e82cb2c72287d648","repo":"tensorflow/models","slug":"block-func-not-supported","errorCode":null,"errorMessage":"Block func {} not supported.","messagePattern":"Block func (.+?) not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/modeling/backbones/efficientnet.py","lineNumber":238,"sourceCode":"\n  def _block_group(self,\n                   inputs: tf.Tensor,\n                   specs: BlockSpec,\n                   name: str = 'block_group'):\n    \"\"\"Creates one group of blocks for the EfficientNet model.\n\n    Args:\n      inputs: A `tf.Tensor` of size `[batch, channels, height, width]`.\n      specs: The specifications for one inverted bottleneck block group.\n      name: A `str` name for the block.\n\n    Returns:\n      The output `tf.Tensor` of the block layer.\n    \"\"\"\n    if specs.block_fn == 'mbconv':\n      block_fn = nn_blocks.InvertedBottleneckBlock\n    else:\n      raise ValueError('Block func {} not supported.'.format(specs.block_fn))\n\n    x = block_fn(\n        in_filters=specs.in_filters,\n        out_filters=specs.out_filters,\n        expand_ratio=specs.expand_ratio,\n        strides=specs.strides,\n        kernel_size=specs.kernel_size,\n        se_ratio=self._se_ratio,\n        stochastic_depth_drop_rate=self._stochastic_depth_drop_rate,\n        kernel_initializer=self._kernel_initializer,\n        kernel_regularizer=self._kernel_regularizer,\n        bias_regularizer=self._bias_regularizer,\n        activation=self._activation,\n        se_inner_activation=self._se_inner_activation,\n        use_sync_bn=self._use_sync_bn,\n        norm_momentum=self._norm_momentum,\n        norm_epsilon=self._norm_epsilon)(\n            inputs)","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/modeling/backbones/efficientnet.py#L220-L256","documentation":"Error \"Block func {} not supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/modeling/backbones/efficientnet.py:238 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported block_fn for EfficientNet: 'mbconv' or 'fused_mbconv'.","Check the model config's block_fn value 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"}