Skip to content

[tmva][sofie] Register the existing Swish operator in the ONNX parser #22552

@harz05

Description

@harz05

Explain what you would like to see improved and how.

SOFIE already has a complete ROperator_Swish, listed in OperatorList.hxx, but the ONNX parser never registers "Swish", so a model containing the standard ONNX Swish op (opset 24, Swish(x) = x*sigmoid(alpha*x), alpha default 1) fails to parse even though the operator is implemented.

The improvement is to add a ParseSwish (mirroring ParseSigmoid) and RegisterOperator("Swish", ParseSwish), which makes the existing operator reachable from ONNX.

Small Note: the current operator implements alpha = 1 (the default). The parser should read the optional alpha attribute and either reject alpha != 1 with a clear error or extend the operator with an alpha parameter.

ROOT version

6.41.01

Installation method

Built from source

Operating system

Ubuntu 22.04.2 LTS

Additional context

Reproducer: parse any ONNX model with a Swish node -> "Operator type Swish is not yet supported", despite ROperator_Swish existing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions