如何在C#coding for Microsoft.ML.onnxruntime中访问DisposableList?

如何在C#coding for Microsoft.ML.onnxruntime中访问DisposableList?,c#,.net,onnx,onnxruntime,C#,.net,Onnx,Onnxruntime,我可以知道如何在控制台中显示以黄色圈出的值吗。 我试过了 在堆栈溢出中尝试,没有人可以帮助。 我是python开发人员,所以不确定c#编码 提前谢谢我找到路了 using (var results = Session.Run(outputs)) { var highestIndex = results.First().AsTensor<long>().First(); C

我可以知道如何在控制台中显示以黄色圈出的值吗。 我试过了

在堆栈溢出中尝试,没有人可以帮助。 我是python开发人员,所以不确定c#编码

提前谢谢我找到路了

            using (var results = Session.Run(outputs))
            {
                var highestIndex = results.First().AsTensor<long>().First();
                Console.WriteLine(highestIndex);
                var seq = results.Last().AsEnumerable<NamedOnnxValue>();
                var map = seq.First().AsDictionary<Int64, float>();
                var values = map.First().Value;
                Console.WriteLine("Index {0} with Probability {1}", map.First().Key, map.First().Value);
                Console.WriteLine("Index {0} with Probability {1}", map.Last().Key, map.Last().Value);
            } 

使用(var结果=Session.Run(输出))
{
var highestIndex=results.First().AsTensor().First();
控制台写入线(最高索引);
var seq=results.Last().AsEnumerable();
var map=seq.First().AsDictionary();
var values=map.First().Value;
WriteLine(“索引{0},概率为{1}”,map.First().Key,map.First().Value);
WriteLine(“索引{0},概率为{1}”,map.Last().Key,map.Last().Value);
} 
1
1.7285347E-05
0.9999827
            using (var results = Session.Run(outputs))
            {
                var highestIndex = results.First().AsTensor<long>().First();
                Console.WriteLine(highestIndex);
                var seq = results.Last().AsEnumerable<NamedOnnxValue>();
                var map = seq.First().AsDictionary<Int64, float>();
                var values = map.First().Value;
                Console.WriteLine("Index {0} with Probability {1}", map.First().Key, map.First().Value);
                Console.WriteLine("Index {0} with Probability {1}", map.Last().Key, map.Last().Value);
            }