Browse Source

added a test case for MnistModelLoader

tags/v0.12
Kerry Jiang 6 years ago
parent
commit
a1806d4905
2 changed files with 29 additions and 0 deletions
  1. +28
    -0
      test/TensorFlowNET.UnitTest/Hub/MnistModelLoaderTest.cs
  2. +1
    -0
      test/TensorFlowNET.UnitTest/TensorFlowNET.UnitTest.csproj

+ 28
- 0
test/TensorFlowNET.UnitTest/Hub/MnistModelLoaderTest.cs View File

@@ -0,0 +1,28 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Tensorflow;
using Tensorflow.Hub;

namespace TensorFlowNET.UnitTest.Hub
{
[TestClass]
public class MnistModelLoaderTest
{
[TestMethod]
public async Task TestLoad()
{
var loader = new MnistModelLoader();
var result = await loader.LoadAsync(new ModelLoadSetting
{
TrainDir = "mnist",
OneHot = true,
ValidationSize = 5000,
});

Assert.IsNotNull(result);
}
}
}

+ 1
- 0
test/TensorFlowNET.UnitTest/TensorFlowNET.UnitTest.csproj View File

@@ -23,6 +23,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\TensorFlowHub\TensorFlowHub.csproj" />
<ProjectReference Include="..\..\src\TensorFlowNET.Core\TensorFlowNET.Core.csproj" />
<ProjectReference Include="..\TensorFlowNET.Examples\TensorFlowNET.Examples.csproj" />
</ItemGroup>


Loading…
Cancel
Save