Skip to content

Commit a1806d4

Browse files
committed
added a test case for MnistModelLoader
1 parent ee9aef8 commit a1806d4

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using Tensorflow;
7+
using Tensorflow.Hub;
8+
9+
namespace TensorFlowNET.UnitTest.Hub
10+
{
11+
[TestClass]
12+
public class MnistModelLoaderTest
13+
{
14+
[TestMethod]
15+
public async Task TestLoad()
16+
{
17+
var loader = new MnistModelLoader();
18+
var result = await loader.LoadAsync(new ModelLoadSetting
19+
{
20+
TrainDir = "mnist",
21+
OneHot = true,
22+
ValidationSize = 5000,
23+
});
24+
25+
Assert.IsNotNull(result);
26+
}
27+
}
28+
}

‎test/TensorFlowNET.UnitTest/TensorFlowNET.UnitTest.csproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26+
<ProjectReference Include="..\..\src\TensorFlowHub\TensorFlowHub.csproj" />
2627
<ProjectReference Include="..\..\src\TensorFlowNET.Core\TensorFlowNET.Core.csproj" />
2728
<ProjectReference Include="..\TensorFlowNET.Examples\TensorFlowNET.Examples.csproj" />
2829
</ItemGroup>

0 commit comments

Comments
 (0)