Skip to content

Commit 209c3b9

Browse files
committed
merge utility to example project.
1 parent 292233b commit 209c3b9

7 files changed

Lines changed: 8 additions & 27 deletions

File tree

‎TensorFlow.NET.sln‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Examples", "t
99
EndProject
1010
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Core", "src\TensorFlowNET.Core\TensorFlowNET.Core.csproj", "{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Utility", "src\TensorFlowNET.Utility\TensorFlowNET.Utility.csproj", "{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}"
13-
EndProject
1412
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Visualization", "TensorFlowNET.Visualization\TensorFlowNET.Visualization.csproj", "{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}"
1513
EndProject
1614
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Core", "..\NumSharp\src\NumSharp.Core\NumSharp.Core.csproj", "{E8340C61-12C1-4BEE-A340-403E7C1ACD82}"
@@ -35,10 +33,6 @@ Global
3533
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Debug|Any CPU.Build.0 = Debug|Any CPU
3634
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Release|Any CPU.ActiveCfg = Release|Any CPU
3735
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Release|Any CPU.Build.0 = Release|Any CPU
38-
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39-
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
40-
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
41-
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Release|Any CPU.Build.0 = Release|Any CPU
4236
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4337
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Debug|Any CPU.Build.0 = Debug|Any CPU
4438
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Release|Any CPU.ActiveCfg = Release|Any CPU

‎src/TensorFlowNET.Utility/TensorFlowNET.Utility.csproj‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -7,14 +7,14 @@
77

88
<ItemGroup>
99
<PackageReference Include="NumSharp" Version="0.7.3" />
10-
<PackageReference Include="TensorFlow.NET" Version="0.3.0" />
10+
<PackageReference Include="SharpZipLib" Version="1.1.0" />
11+
<PackageReference Include="TensorFlow.NET" Version="0.4.2" />
1112
</ItemGroup>
1213

1314
<ItemGroup>
1415
<ProjectReference Include="..\..\..\NumSharp\src\NumSharp.Core\NumSharp.Core.csproj" />
1516
<ProjectReference Include="..\..\..\scikit-learn.net\src\scikit-learn\scikit-learn.csproj" />
1617
<ProjectReference Include="..\..\src\TensorFlowNET.Core\TensorFlowNET.Core.csproj" />
17-
<ProjectReference Include="..\..\src\TensorFlowNET.Utility\TensorFlowNET.Utility.csproj" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

‎test/TensorFlowNET.Examples/TextClassification/DataHelpers.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static (string[], NDArray) load_data_and_labels(string positive_data_file
7777

7878
var positive_labels = positive_examples.Select(x => new int[2] { 0, 1 }).ToArray();
7979
var negative_labels = negative_examples.Select(x => new int[2] { 1, 0 }).ToArray();
80-
var y = np.concatenate(new int[][][] { positive_labels, negative_labels });
80+
var y = np.array(1);// np.concatenate(new int[][][] { positive_labels, negative_labels });
8181
return (x_text.ToArray(), y);
8282
}
8383

‎test/TensorFlowNET.Examples/TextClassification/TextClassificationTrain.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Linq;
66
using System.Text;
77
using Tensorflow;
8-
using TensorFlowNET.Utility;
8+
using TensorFlowNET.Examples.Utility;
99

1010
namespace TensorFlowNET.Examples.CnnTextClassification
1111
{
@@ -24,7 +24,7 @@ public void Run()
2424
download_dbpedia();
2525
Console.WriteLine("Building dataset...");
2626
var (x, y, alphabet_size) = DataHelpers.build_char_dataset("train", "vdcnn", CHAR_MAX_LEN);
27-
var (train_x, valid_x, train_y, valid_y) = train_test_split(x, y, test_size: 0.15);
27+
//var (train_x, valid_x, train_y, valid_y) = train_test_split(x, y, test_size: 0.15);
2828
}
2929

3030
public void download_dbpedia()

src/TensorFlowNET.Utility/Compress.cs renamed to test/TensorFlowNET.Examples/Utility/Compress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Threading;
88
using System.Threading.Tasks;
99

10-
namespace TensorFlowNET.Utility
10+
namespace TensorFlowNET.Examples.Utility
1111
{
1212
public class Compress
1313
{

src/TensorFlowNET.Utility/Web.cs renamed to test/TensorFlowNET.Examples/Utility/Web.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Threading;
88
using System.Threading.Tasks;
99

10-
namespace TensorFlowNET.Utility
10+
namespace TensorFlowNET.Examples.Utility
1111
{
1212
public class Web
1313
{

0 commit comments

Comments
 (0)