Skip to content

TensorRT10 conversion replaces Sigmoid with ReLU + Identity #46

@az45uhuj

Description

@az45uhuj

Hi, thanks for this great work on DepthAnything TensorRT.

I am trying to convert metric DethAnything model to trt but facing incorrect output depth problems.

Description:
When exporting a metric DepthAnything PyTorch model with a Sigmoid activation to TensorRT via ONNX, the conversion replaces Sigmoid with ReLU + Identity. This changes the network behavior because the output is no longer in [0, 1].

Expected behavior:
Sigmoid activations should be preserved in TensorRT conversion, as TensorRT 10 supports SIGMOID natively. The results are visually correct.

Actual behavior:
nn.Sigmoid() is replaced with nn.ReLU() and nn.Identity() in the converted model, leading to incorrect output values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions