LearningModelPreview.InferencingOptions 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
더 이상 사용되지 않습니다. 모델 평가에 대한 추론 옵션을 가져오거나 설정합니다.
public:
property InferencingOptionsPreview ^ InferencingOptions { InferencingOptionsPreview ^ get(); void set(InferencingOptionsPreview ^ value); };
InferencingOptionsPreview InferencingOptions();
void InferencingOptions(InferencingOptionsPreview value);
/// [get: Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
InferencingOptionsPreview InferencingOptions();
void InferencingOptions(InferencingOptionsPreview value);
public InferencingOptionsPreview InferencingOptions { get; set; }
public InferencingOptionsPreview InferencingOptions { [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] set; }
var inferencingOptionsPreview = learningModelPreview.inferencingOptions;
learningModelPreview.inferencingOptions = inferencingOptionsPreview;
Public Property InferencingOptions As InferencingOptionsPreview
속성 값
모델 평가에 대한 추론 옵션입니다.
- 특성
예제
public async Task LoadModelAsync()
{
// Load Model
var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);
//Set inferencing options to use GPU
InferencingOptionsPreview options = model.InferencingOptions;
options.PreferredDeviceKind = LearningModelDeviceKindPreview.LearningDeviceCpu;
model.InferencingOptions = options;
}
설명
경고
더 이상 사용되지 않는 API입니다. 대신 Windows.AI.MachineLearning 네임스페이스를 사용하세요.