Skip to content

[Lane 2 · kotlin-core] ONNX importer — import ONNX BatchNormalization as a real op #1404

Open

Description

@michalharakal

Sub-issue of #1400 ([Feature]: ONNX importer — replace placeholder ops with real operations, stream tensors in OnnxModelReader).

Lane: 2 · Kotlin core
Skill needed: Kotlin. No ONNX-protobuf knowledge needed — the node is already parsed; you only map it.
Size: s (a few hours)
Blocked by: nothing

What to do

  1. In skainet-io/skainet-io-onnx/src/commonMain/kotlin/sk/ainet/io/onnx/OnnxImport.kt (toOperation()), BatchNormalization currently maps to OnnxPlaceholderOperation, which throws when the graph is executed. Map it to a real batch-norm operation (inference form: scale, B, mean, var inputs; epsilon attribute) instead, copying how RELU / CONV map to real operations.
  2. Read the ONNX operator spec for its attributes and defaults: https://onnx.ai/onnx/operators/
  3. Add a one-node import + execute test next to the existing importer tests in skainet-io/skainet-io-onnx/src/commonTest.
  4. Run ./gradlew :skainet-io:skainet-io-onnx:jvmTest.

Acceptance

  • A one-node BatchNormalization graph imports and executes with the expected values
  • Result reported back on the parent issue

Notes

Check how the StableHLO side names batch norm (batchNorm) and which graph operation the DSL uses, and reuse that.

Coverage matrix: docs/modules/ROOT/pages/reference/ops-status-matrix.adoc · How lanes work: Issue taxonomy

Metadata

Metadata

Assignees

No one assigned

    Labels

    codingImplementation task (DARC: C)size:sA few hoursskill:kotlin-coreKotlin implementation in commonMainsub-issueSub-issue of a tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions