1 write to Host
Microsoft.ML.TorchSharp (1)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
123Host = Contracts.CheckRef(env, nameof(env)).Register(nameof(ObjectDetectionTrainer));
17 references to Host
Microsoft.ML.TorchSharp (17)
AutoFormerV2\ObjectDetectionTrainer.cs (17)
161using (var ch = Host.Start("TrainModel")) 162using (var pch = Host.StartProgressChannel("Training model")) 177Host.CheckAlive(); 178trainer.Train(Host, input, pch); 183transformer = new ObjectDetectionTransformer(Host, Option, trainer.Model, new DataViewSchema.DetachedColumn(labelCol.Value)); 213Device = TorchUtils.InitializeDevice(Parent.Host); 226Device = TorchUtils.InitializeDevice(Parent.Host); 261var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 269using (var ch = (Parent.Host as IHostEnvironment).Start("Ensuring model file is present.")) 271var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout); 440Host.CheckValue(inputSchema, nameof(inputSchema)); 481throw Host.ExceptSchemaMismatch(nameof(inputSchema), "label", Option.LabelColumnName); 483throw Host.ExceptSchemaMismatch(nameof(inputSchema), "label", Option.LabelColumnName, 487throw Host.ExceptSchemaMismatch(nameof(inputSchema), "BoundingBox", Option.BoundingBoxColumnName); 489throw Host.ExceptSchemaMismatch(nameof(inputSchema), "BoundingBox", Option.BoundingBoxColumnName, 493throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Image", Option.ImageColumnName); 495throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Image", Option.ImageColumnName,