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