1 write to _parent
Microsoft.ML.TorchSharp (1)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
733_parent = parent;
19 references to _parent
Microsoft.ML.TorchSharp (19)
AutoFormerV2\ObjectDetectionTrainer.cs (19)
755var keyType = _parent.LabelColumn.Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType; 756var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.ItemType.RawType, _parent.LabelColumn); 767info[0] = new DataViewSchema.DetachedColumn(_parent.Options.PredictedLabelColumnName, new VectorDataViewType(new KeyDataViewType(typeof(uint), _parent.Options.NumberOfClasses)), labelBuilder.ToAnnotations()); 769info[1] = new DataViewSchema.DetachedColumn(_parent.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single), meta.ToAnnotations()); 771info[2] = new DataViewSchema.DetachedColumn(_parent.Options.PredictedBoundingBoxColumnName, new VectorDataViewType(NumberDataViewType.Single)); 808getImage = input.GetGetter<MLImage>(input.Schema[_parent.Options.ImageColumnName]); 832getImage = input.GetGetter<MLImage>(input.Schema[_parent.Options.ImageColumnName]); 856getImage = input.GetGetter<MLImage>(input.Schema[_parent.Options.ImageColumnName]); 881TensorCacher outputCacher = new TensorCacher(_parent.Options.NumberOfClasses); 883_parent.Model.eval(); 905var midTensor0 = torch.tensor(image.GetBGRPixels, device: _parent.Device); 921var transMidTensor = torch.zeros(1, 3, image.Height + padH, image.Width + padW, device: _parent.Device); 923var imageTensor = ObjectDetectionTrainer.Trainer.Normalize(transMidTensor, _parent.Device); 930return _parent.Model.forward(inputTensor); 969_parent.Model.eval(); 973ImageUtils.Postprocess(imageTensor, pred, score, box, out outputCache.PredictedLabelsBuffer, out outputCache.ScoresBuffer, out outputCache.BoxBuffer, _parent.Options.ScoreThreshold, _parent.Options.IOUThreshold); 983private protected override void SaveModel(ModelSaveContext ctx) => _parent.SaveModel(ctx);