Closed NofAssiri closed 4 months ago
Are you able to upload the model/data/repro project so we can take a look at it?
This issue has been marked needs-author-action
and may be missing some important information.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
This issue will now be closed since it had been marked no-recent-activity
but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
System information
processor: 12th Gen Intel Core i7-12800HX
chip Type: AMD Software: Pro Edition 0x73E1 VRAM 8GB
Ram: 32GB
OS version/distro:
windows : 11 pro 64-bit build 22621
.NET Version (eg., dotnet --info): .NET8
Issue
i have ml.net model of size 47MB (zipped) it loads in 1 second and takes about 100, 150MB of memory, but when i convert it to onnx format using ConvertToOnnx function and empty list of input data type, now the model size 112MB, loads in 6 seconds and takes about 2GB of memory
Source code / logs
conversion code var dummy = new List();
var dummyData = _ctx.Data.LoadFromEnumerable(dummy);
using (var onnx = File.Open("C:\models\onnModel.onnx", FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
_ctx.Model.ConvertToOnnx(transformer, dummyData, onnx);
}
load code var ctx =new MLContext(); var model = ctx.transform.ApplyOnnxModel("C:\models\onnxModel.onnx");