3 instantiations of OnnxModel
Microsoft.ML.OnnxTransformer (3)
OnnxTransform.cs (1)
265Model = new OnnxModel(env, options.ModelFile, options.GpuDeviceId, options.FallbackToCpu, ownModelFile: false, shapeDictionary: shapeDictionary, options.RecursionLimit,
OnnxUtils.cs (2)
410return new OnnxModel(env, tempModelFile, gpuDeviceId, fallbackToCpu, 439return new OnnxModel(env, tempModelFile, gpuDeviceId, fallbackToCpu,
20 references to OnnxModel
Microsoft.ML.OnnxTransformer (19)
OnnxTransform.cs (4)
111internal readonly OnnxModel Model; 273Model = OnnxModel.CreateFromStream(options.ModelBytes, env, options.GpuDeviceId, options.FallbackToCpu, shapeDictionary: shapeDictionary, options.RecursionLimit); 280Model = OnnxModel.CreateFromBytes(modelBytes, env, options.GpuDeviceId, options.FallbackToCpu, shapeDictionary: shapeDictionary, options.RecursionLimit); 515var model = _parent.Model;
OnnxUtils.cs (15)
47/// Inputs of the containing <see cref="OnnxModel"/>. 51/// Outputs of the containing <see cref="OnnxModel"/>. 56/// Initializers of the containing <see cref="OnnxModel"/> 166/// <param name="ownModelFile">If true, the <paramref name="modelFile"/> will be deleted when <see cref="OnnxModel"/> is 378/// Create an OnnxModel from a byte[]. Usually, a ONNX model is consumed by <see cref="OnnxModel"/> as a file. 380/// it's possible to use in-memory model (type: byte[]) to create <see cref="OnnxModel"/>. 384public static OnnxModel CreateFromBytes(byte[] modelBytes, IHostEnvironment env) 391/// Usually, an ONNX model is consumed by <see cref="OnnxModel"/> as a file. 394/// it's possible to use in-memory model (type: byte[]) to create <see cref="OnnxModel"/>. 404/// <returns>An <see cref="OnnxModel"/></returns> 405public static OnnxModel CreateFromBytes(byte[] modelBytes, IHostEnvironment env, int? gpuDeviceId = null, bool fallbackToCpu = false, 416/// Usually, an ONNX model is consumed by <see cref="OnnxModel"/> as a file. 419/// it's possible to use in-memory model (type: byte[]) to create <see cref="OnnxModel"/>. 429/// <returns>An <see cref="OnnxModel"/></returns> 430public static OnnxModel CreateFromStream(Stream modelBytes, IHostEnvironment env, int? gpuDeviceId = null, bool fallbackToCpu = false,
Microsoft.ML.OnnxTransformerTest (1)
OnnxTransformTests.cs (1)
794var onnxModel = OnnxModel.CreateFromBytes(modelInBytes, ML);