Skip to content

[Feature Request] using SetSeed on C++ inference #23306

@k5-inoue

Description

@k5-inoue

Describe the feature request

Will a future update be able to fix the random number seed during inference as well?

Describe scenario use case

Hi, I am making a C++ program for inference with a neural network model.
The neural network model includes a module that generates random numbers (RandomNormalLike).
Therefore, the output values are slightly different even for the same input.

I want to implement a function that turns this randomness on and off.
Example: We would like to store and use the seed of an excellent result.
Looking at the API reference, it seems that the SetSeed() function can be used to fix the random number seed during training (onnxruntime_training_c_api.h), but it is not available during inference (onnxruntime_cxx_api.h).
https://onnxruntime.ai/docs/api/c/namespace_ort.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestrequest for unsupported feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions