Browse Source

add imdb zip data.

tags/v0.8.0
haiping008 6 years ago
parent
commit
317740a418
5 changed files with 35 additions and 2 deletions
  1. BIN
      data/imdb.zip
  2. +1
    -1
      test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj
  3. +33
    -0
      test/TensorFlowNET.Examples/TextClassificationWithMovieReviews.cs
  4. +0
    -0
      test/TensorFlowNET.Examples/python/text_classification_with_movie_reviews.py
  5. +1
    -1
      test/TensorFlowNET.UnitTest/TensorFlowNET.UnitTest.csproj

BIN
data/imdb.zip View File


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

@@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="NumSharp" Version="0.7.2" />
<PackageReference Include="TensorFlow.NET" Version="0.2.0" />
<PackageReference Include="TensorFlow.NET" Version="0.3.0" />
</ItemGroup>

<ItemGroup>


+ 33
- 0
test/TensorFlowNET.Examples/TextClassificationWithMovieReviews.cs View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Tensorflow;

namespace TensorFlowNET.Examples
{
public class TextClassificationWithMovieReviews : Python, IExample
{
string dir = "text_classification_with_movie_reviews";

public void Run()
{
PrepareData();
}

private void PrepareData()
{

Directory.CreateDirectory(dir);

// get model file
string url = "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz";

string zipFile = Path.Join(dir, $"imdb.zip");
Utility.Web.Download(url, zipFile);

if (!File.Exists(Path.Join(dir, zipFile)))
Utility.Compress.ExtractTGZ(zipFile, dir);
}
}
}

test/TensorFlowNET.Examples/python/basic_text_classification.py → test/TensorFlowNET.Examples/python/text_classification_with_movie_reviews.py View File


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

@@ -20,7 +20,7 @@
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="NumSharp" Version="0.7.2" />
<PackageReference Include="TensorFlow.NET" Version="0.2.0" />
<PackageReference Include="TensorFlow.NET" Version="0.3.0" />
</ItemGroup>

<ItemGroup>


Loading…
Cancel
Save