Merge branch 'master' into user/numform/gallery_pipeline_sdk

This commit is contained in:
nums11 2022-02-28 14:10:33 -08:00
Родитель 1eaca63931 12af7eb8b7
Коммит cc670a877d
13 изменённых файлов: 79 добавлений и 65 удалений

Просмотреть файл

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props')" />
<Import Project="..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props')" />
<Import Project="..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@ -12,7 +12,7 @@
<ProjectGuid>{a43bd199-ec83-4b0e-9950-a2b8aa51439f}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>BatchSupport</RootNamespace>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -159,9 +159,6 @@
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug_NuGet|x64'">true</DeploymentContent>
<FileType>Document</FileType>
</CopyFileToFolders>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\..\SharedContent\media\fish.png">
@ -179,21 +176,24 @@
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug_NuGet|x64'">true</DeploymentContent>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.210722.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -33,9 +33,6 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\..\SharedContent\media\fish.png">
<Filter>Resource Files</Filter>
@ -53,4 +50,7 @@
<Filter>Resource Files</Filter>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AI.DirectML" version="1.5.1" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.8.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.210722.2" targetFramework="native" />
<package id="Microsoft.AI.DirectML" version="1.8.0" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.10.0" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.220131.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props')" />
<Import Project="..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props')" />
<PropertyGroup Label="Globals">
<CppWinRTEnabled>true</CppWinRTEnabled>
<MinimalCoreWin>true</MinimalCoreWin>
@ -8,7 +10,7 @@
<ProjectGuid>{4420ecd4-ad04-4183-9879-7d52039e5422}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CustomTensorization</RootNamespace>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -40,7 +42,7 @@
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
@ -130,22 +132,30 @@
<CopyFileToFolders Include="fns-candy.onnx">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="fish_720.png">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets" Condition="Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets')" />
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.1.0.181002.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.DirectML.1.8.0\build\Microsoft.AI.DirectML.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.10.0\build\native\Microsoft.AI.MachineLearning.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -36,9 +36,6 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="fish_720.png">
<Filter>Resource Files</Filter>
@ -47,4 +44,7 @@
<Filter>Resource Files</Filter>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -196,11 +196,14 @@ namespace TensorizationHelper
pGPUResource.put_void()
));
// 5. Create the GPU upload buffer.
heapProperties = CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_UPLOAD);
resourceDesc = CD3DX12_RESOURCE_DESC::Buffer(bufferbytesize);
CHECK_HRESULT(pD3D12Device->CreateCommittedResource(
&CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_UPLOAD),
&heapProperties,
D3D12_HEAP_FLAG_NONE,
&CD3DX12_RESOURCE_DESC::Buffer(bufferbytesize),
&resourceDesc,
D3D12_RESOURCE_STATE_GENERIC_READ,
nullptr,
__uuidof(ID3D12Resource),

Просмотреть файл

@ -93,7 +93,7 @@ void BindModel(
deviceKind = LearningModelDeviceKind::Default;
inputTensor = TensorizationHelper::SoftwareBitmapToSoftwareTensor(imageFrame.SoftwareBitmap());
}
session = LearningModelSession{ model, deviceKind};
session = LearningModelSession( model, LearningModelDevice(deviceKind));
binding = LearningModelBinding{ session };
// bind the intput image

Просмотреть файл

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="1.0.181002.2" targetFramework="native" />
<package id="Microsoft.AI.DirectML" version="1.8.0" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.10.0" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.220131.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props')" />
<Import Project="..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props" Condition="Exists('..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props')" />
<Import Project="..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_NuGet|Win32">
<Configuration>Debug_NuGet</Configuration>
@ -252,16 +251,13 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets" Condition="Exists('..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets')" />
<Import Project="..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets')" />
<Import Project="..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.props'))" />
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.AI.DirectML.1.5.1\build\Microsoft.AI.DirectML.targets'))" />
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.props'))" />
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.AI.MachineLearning.1.8.1\build\native\Microsoft.AI.MachineLearning.targets'))" />
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\BatchSupport\packages\Microsoft.Windows.CppWinRT.2.0.220131.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AI.DirectML" version="1.5.1" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.8.1" targetFramework="native" />
<package id="Microsoft.AI.DirectML" version="1.8.0" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.10.0" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.220131.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -42,6 +42,8 @@ To learn how to implement these features in your application, or unlock addition
- [Encrypted Model](./WinMLSamplesGallery/Samples/EncryptedModel): how to use [Windows ML](https://docs.microsoft.com/en-us/windows/ai/windows-ml/) to load encrypted models from embedded resources.
- [Adapter Selection](./WinMLSamplesGallery/Samples/AdapterSelection): Learn how to use [Windows ML](https://docs.microsoft.com/en-us/windows/ai/windows-ml/) with different adapters based on your power and performance needs.
## Feedback
Please file an issue [here](https://github.com/microsoft/Windows-Machine-Learning/issues/new) if you encounter any issues with the WinML Samples Gallery or wish to request a new sample.

Просмотреть файл

@ -10,9 +10,9 @@ The sample showcases how to use Windows ML with different adapters that have tra
- [External Links](#external-links)
## Getting Started
- Check out the [source](https://github.com/microsoft/Windows-Machine-Learning/blob/master/adapter_selection/Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/AdapterSelection/AdapterSelection.xaml.cs).
- Learn how to [get a list of adapters using DXCore](https://github.com/microsoft/Windows-Machine-Learning/blob/master/adapter_selection/Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/AdapterList.cpp#L12) to your session.
- Learn how to [create learning model devices from adapters](https://github.com/microsoft/Windows-Machine-Learning/blob/master/adapter_selection/Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/AdapterList.cpp#L41).
- Check out the [source](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/AdapterSelection/AdapterSelection.xaml.cs).
- Learn how to [get a list of adapters using DXCore](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/AdapterList.cpp#L12) to your session.
- Learn how to [create learning model devices from adapters](https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/AdapterList.cpp#L46).
## Feedback
Please file an issue [here](https://github.com/microsoft/Windows-Machine-Learning/issues/new) if you encounter any issues with the Windows ML Samples Gallery or wish to request a new sample.

Просмотреть файл

@ -165,54 +165,54 @@
<Target Name="DownloadContentFiles" BeforeTargets="BeforeBuild">
<!-- Small models. These models get shipped in the store app by default. -->
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\densenet-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/densenet-121/model/densenet-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\densenet-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/densenet-121/model/densenet-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\efficientnet-lite4-11.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\efficientnet-lite4-11.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\shufflenet-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/shufflenet/model/shufflenet-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\shufflenet-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/shufflenet/model/shufflenet-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\squeezenet1.1-7.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/squeezenet/model/squeezenet1.1-7.onnx" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<DownloadFile Condition="!Exists('$(MSBuildProjectDirectory)\Models\squeezenet1.1-7.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/squeezenet/model/squeezenet1.1-7.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\Models">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<!-- Large models. This models must be enabled for Build-From-Source scenarios -->
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\bvlcalexnet-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/alexnet/model/bvlcalexnet-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\bvlcalexnet-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/alexnet/model/bvlcalexnet-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\caffenet-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/caffenet/model/caffenet-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\caffenet-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/caffenet/model/caffenet-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\googlenet-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\googlenet-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\inception-v1-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/inception_and_googlenet/inception_v1/model/inception-v1-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\inception-v1-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/inception_and_googlenet/inception_v1/model/inception-v1-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\inception-v2-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/inception_and_googlenet/inception_v2/model/inception-v2-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\inception-v2-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/inception_and_googlenet/inception_v2/model/inception-v2-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\mobilenetv2-7.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/mobilenet/model/mobilenetv2-7.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\mobilenetv2-7.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-7.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\rcnn-ilsvrc13-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/rcnn_ilsvrc13/model/rcnn-ilsvrc13-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\rcnn-ilsvrc13-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/rcnn_ilsvrc13/model/rcnn-ilsvrc13-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\resnet50-caffe2-v1-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\resnet50-caffe2-v1-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\shufflenet-v2-10.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/shufflenet/model/shufflenet-v2-10.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\shufflenet-v2-10.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/shufflenet/model/shufflenet-v2-10.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\vgg19-7.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/vgg/model/vgg19-7.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\vgg19-7.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/vgg/model/vgg19-7.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\vgg19-bn-7.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/vgg/model/vgg19-bn-7.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\vgg19-bn-7.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/vgg/model/vgg19-bn-7.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\zfnet512-9.onnx')" SourceUrl="https://github.com/onnx/models/raw/master/vision/classification/zfnet-512/model/zfnet512-9.onnx" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<DownloadFile Condition="$(UseLargeModels) AND !Exists('$(MSBuildProjectDirectory)\LargeModels\zfnet512-9.onnx')" SourceUrl="https://github.com/onnx/models/blob/main/vision/classification/zfnet-512/model/zfnet512-9.onnx?raw=true" DestinationFolder="$(MSBuildProjectDirectory)\LargeModels">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
</Target>