{"record":{"id":"5927144b5886c8f8","repo":"keras-team/keras","slug":"unknown-inception-resnet-block-type-expects-bloc","errorCode":null,"errorMessage":"Unknown Inception-ResNet block type. Expects \"block35\", \"block17\" or \"block8\", but got: {block_type}","messagePattern":"Unknown Inception-ResNet block type\\. Expects \"block35\", \"block17\" or \"block8\", but got: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/applications/inception_resnet_v2.py","lineNumber":353,"sourceCode":"        branch_1 = conv2d_bn(branch_1, 32, 3)\n        branch_2 = conv2d_bn(x, 32, 1)\n        branch_2 = conv2d_bn(branch_2, 48, 3)\n        branch_2 = conv2d_bn(branch_2, 64, 3)\n        branches = [branch_0, branch_1, branch_2]\n    elif block_type == \"block17\":\n        branch_0 = conv2d_bn(x, 192, 1)\n        branch_1 = conv2d_bn(x, 128, 1)\n        branch_1 = conv2d_bn(branch_1, 160, [1, 7])\n        branch_1 = conv2d_bn(branch_1, 192, [7, 1])\n        branches = [branch_0, branch_1]\n    elif block_type == \"block8\":\n        branch_0 = conv2d_bn(x, 192, 1)\n        branch_1 = conv2d_bn(x, 192, 1)\n        branch_1 = conv2d_bn(branch_1, 224, [1, 3])\n        branch_1 = conv2d_bn(branch_1, 256, [3, 1])\n        branches = [branch_0, branch_1]\n    else:\n        raise ValueError(\n            \"Unknown Inception-ResNet block type. \"\n            'Expects \"block35\", \"block17\" or \"block8\", '\n            f\"but got: {block_type}\"\n        )\n\n    block_name = f\"{block_type}_{block_idx}\"\n    channel_axis = 1 if backend.image_data_format() == \"channels_first\" else 3\n    mixed = layers.Concatenate(axis=channel_axis, name=f\"{block_name}_mixed\")(\n        branches\n    )\n    up = conv2d_bn(\n        mixed,\n        x.shape[channel_axis],\n        1,\n        activation=None,\n        use_bias=True,\n        name=f\"{block_name}_conv\",\n    )","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/applications/inception_resnet_v2.py#L335-L371","documentation":"Error \"Unknown Inception-ResNet block type. Expects \"block35\", \"block17\" or \"block8\", but got: {block_type}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/applications/inception_resnet_v2.py:353 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":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}