public static async Task <ContosoITModel> CreateContosoITModel(StorageFile file) { LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file); ContosoITModel model = new ContosoITModel(); model.learningModel = learningModel; return(model); }
public static async Task <ContosoITModel> CreateFromStreamAsync(IRandomAccessStreamReference stream) { ContosoITModel learningModel = new ContosoITModel(); learningModel.model = await LearningModel.LoadFromStreamAsync(stream); learningModel.session = new LearningModelSession(learningModel.model); learningModel.binding = new LearningModelBinding(learningModel.session); return(learningModel); }