Skip to content

How to run onnx model with batch/sequence #22202

Closed Answered by EmileVinsonneau
EmileVinsonneau asked this question in API Q&A
Discussion options

You must be logged in to vote

After reading this dotnet/machinelearning#6066

I change my input and output to have only dimensionnal array.

public class SileroInput
{
    protected const int batch = 1; 

    [ColumnName("input")]
    public float[] Audio { get; set; }

    [ColumnName("sr")]
    public long SampleRate { get; set; }
    
    [ColumnName("h")]
    public float[] H { get; set; } = new float[2 * batch * 64];
    
    [ColumnName("c")]
    public float[] C { get; set; }= new float[2 * batch * 64];
}

public class SileroOutput : SileroInput
{
    [ColumnName("output")]
    public Single[] Probability { get; set; } = new float[batch * 1];
    
    [ColumnName("hn")]
    public Single[] HN { get; set; } = new …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by EmileVinsonneau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
API Q&A
Labels
None yet
1 participant