LearningModelBindingPreview.Clear 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
已取代。 清除所有系結變數。
public:
virtual void Clear() = Clear;
void Clear();
/// [Windows.Foundation.Metadata.Deprecated("Use ILearningModelBinding instead of ILearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
void Clear();
public void Clear();
[Windows.Foundation.Metadata.Deprecated("Use ILearningModelBinding instead of ILearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public void Clear();
function clear()
Public Sub Clear ()
- 屬性
範例
public void PrepareBinding(LearningModelPreview model, VideoFrame picture)
{
ImageVariableDescriptorPreview inputImageDescription;
List<ILearningModelVariableDescriptorPreview> inputFeatures = model.Description.InputFeatures.ToList();
inputImageDescription =
inputFeatures.FirstOrDefault(feature => feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image)
as ImageVariableDescriptorPreview;
// Bind the image
var binding = new LearningModelBindingPreview(model);
binding.Bind(inputImageDescription, picture);
}
//Evaluate and other application logic
...
binding.Clear();
}
備註
警告
這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。