{"record":{"id":"8058ee75e592eac5","repo":"tracel-ai/burn","slug":"unsupported-reparameterization-tensor-rank-other","errorCode":null,"errorMessage":"Unsupported reparameterization tensor rank: {other}","messagePattern":"Unsupported reparameterization tensor rank: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-core/src/module/param/reparameterization_dyn.rs","lineNumber":178,"sourceCode":"                $body\n            }\n            5 => {\n                const $d: usize = 5;\n                $body\n            }\n            6 => {\n                const $d: usize = 6;\n                $body\n            }\n            7 => {\n                const $d: usize = 7;\n                $body\n            }\n            8 => {\n                const $d: usize = 8;\n                $body\n            }\n            other => panic!(\"Unsupported reparameterization tensor rank: {other}\"),\n        }\n    };\n}\n\n/// Borrowed type-erased parameter passed through [`DynModuleVisitor`].\n///\n/// The runtime rank identifies the concrete `Param<Tensor<D, K>>` stored in `value`.\npub struct DynParamRef<'a> {\n    rank: usize,\n    value: &'a dyn Any,\n}\n\nimpl<'a> DynParamRef<'a> {\n    fn new<T: Any>(rank: usize, value: &'a T) -> Self {\n        Self { rank, value }\n    }\n}\n","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-core/src/module/param/reparameterization_dyn.rs#L160-L196","documentation":"Rank-dispatch exhaustiveness guard in the reparameterization macro: tensor ranks 1 through 8 are expanded into specialized code paths, and any tensor outside that range (rank 0, or 9+) hits the `other` arm. The failing input is a DynModule parameter tensor whose rank the reparameterization machinery cannot specialize.","triggerScenarios":"Thrown at crates/burn-core/src/module/param/reparameterization_dyn.rs:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a tensor of rank 1–8; reshape or squeeze unit dimensions to bring the rank into the supported range.","If higher ranks are genuinely needed, extend the macro to generate more rank arms and recompile.","Check that the module field type declares the intended const rank D rather than an accidental scalar/extra-dim tensor."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}