Browse Source

merge utility to example project.

tags/v0.8.0
Oceania2018 6 years ago
parent
commit
209c3b99d1
7 changed files with 8 additions and 27 deletions
  1. +0
    -6
      TensorFlow.NET.sln
  2. +0
    -13
      src/TensorFlowNET.Utility/TensorFlowNET.Utility.csproj
  3. +3
    -3
      test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj
  4. +1
    -1
      test/TensorFlowNET.Examples/TextClassification/DataHelpers.cs
  5. +2
    -2
      test/TensorFlowNET.Examples/TextClassification/TextClassificationTrain.cs
  6. +1
    -1
      test/TensorFlowNET.Examples/Utility/Compress.cs
  7. +1
    -1
      test/TensorFlowNET.Examples/Utility/Web.cs

+ 0
- 6
TensorFlow.NET.sln View File

@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Examples", "t
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Core", "src\TensorFlowNET.Core\TensorFlowNET.Core.csproj", "{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Utility", "src\TensorFlowNET.Utility\TensorFlowNET.Utility.csproj", "{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Visualization", "TensorFlowNET.Visualization\TensorFlowNET.Visualization.csproj", "{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}"
EndProject
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
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD682AC0-7B2D-45D3-8B0D-C6D678B04144}.Release|Any CPU.Build.0 = Release|Any CPU
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00D9085C-0FC7-453C-A0CC-BAD98F44FEA0}.Release|Any CPU.Build.0 = Release|Any CPU
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BB2ABD1-635E-41E4-B534-CB5B6A2D754D}.Release|Any CPU.ActiveCfg = Release|Any CPU


+ 0
- 13
src/TensorFlowNET.Utility/TensorFlowNET.Utility.csproj View File

@@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>TensorFlowNET.Utility</AssemblyName>
<RootNamespace>TensorFlowNET.Utility</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.1.0" />
</ItemGroup>

</Project>

+ 3
- 3
test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="NumSharp" Version="0.7.3" />
<PackageReference Include="TensorFlow.NET" Version="0.3.0" />
<PackageReference Include="SharpZipLib" Version="1.1.0" />
<PackageReference Include="TensorFlow.NET" Version="0.4.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\NumSharp\src\NumSharp.Core\NumSharp.Core.csproj" />
<ProjectReference Include="..\..\..\scikit-learn.net\src\scikit-learn\scikit-learn.csproj" />
<ProjectReference Include="..\..\src\TensorFlowNET.Core\TensorFlowNET.Core.csproj" />
<ProjectReference Include="..\..\src\TensorFlowNET.Utility\TensorFlowNET.Utility.csproj" />
</ItemGroup>

<ItemGroup>


+ 1
- 1
test/TensorFlowNET.Examples/TextClassification/DataHelpers.cs View File

@@ -77,7 +77,7 @@ namespace TensorFlowNET.Examples.CnnTextClassification

var positive_labels = positive_examples.Select(x => new int[2] { 0, 1 }).ToArray();
var negative_labels = negative_examples.Select(x => new int[2] { 1, 0 }).ToArray();
var y = np.concatenate(new int[][][] { positive_labels, negative_labels });
var y = np.array(1);// np.concatenate(new int[][][] { positive_labels, negative_labels });
return (x_text.ToArray(), y);
}



+ 2
- 2
test/TensorFlowNET.Examples/TextClassification/TextClassificationTrain.cs View File

@@ -5,7 +5,7 @@ using System.IO;
using System.Linq;
using System.Text;
using Tensorflow;
using TensorFlowNET.Utility;
using TensorFlowNET.Examples.Utility;

namespace TensorFlowNET.Examples.CnnTextClassification
{
@@ -24,7 +24,7 @@ namespace TensorFlowNET.Examples.CnnTextClassification
download_dbpedia();
Console.WriteLine("Building dataset...");
var (x, y, alphabet_size) = DataHelpers.build_char_dataset("train", "vdcnn", CHAR_MAX_LEN);
var (train_x, valid_x, train_y, valid_y) = train_test_split(x, y, test_size: 0.15);
//var (train_x, valid_x, train_y, valid_y) = train_test_split(x, y, test_size: 0.15);
}

public void download_dbpedia()


src/TensorFlowNET.Utility/Compress.cs → test/TensorFlowNET.Examples/Utility/Compress.cs View File

@@ -7,7 +7,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace TensorFlowNET.Utility
namespace TensorFlowNET.Examples.Utility
{
public class Compress
{

src/TensorFlowNET.Utility/Web.cs → test/TensorFlowNET.Examples/Utility/Web.cs View File

@@ -7,7 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace TensorFlowNET.Utility
namespace TensorFlowNET.Examples.Utility
{
public class Web
{

Loading…
Cancel
Save