Browse Source

work with NumSharp v0.9

tags/v0.9
Oceania2018 6 years ago
parent
commit
bfdaa6b94d
44 changed files with 61 additions and 72 deletions
  1. +7
    -7
      TensorFlow.NET.sln
  2. +1
    -1
      src/TensorFlowNET.Core/APIs/tf.tile.cs
  3. +1
    -1
      src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs
  4. +1
    -2
      src/TensorFlowNET.Core/Graphs/Graph.Operation.cs
  5. +1
    -1
      src/TensorFlowNET.Core/Keras/Sequence.cs
  6. +1
    -1
      src/TensorFlowNET.Core/Operations/array_ops.py.cs
  7. +1
    -2
      src/TensorFlowNET.Core/Operations/gen_array_ops.cs
  8. +4
    -3
      src/TensorFlowNET.Core/Operations/gen_math_ops.cs
  9. +1
    -1
      src/TensorFlowNET.Core/Operations/math_ops.cs
  10. +1
    -1
      src/TensorFlowNET.Core/Python.cs
  11. +1
    -1
      src/TensorFlowNET.Core/Sessions/BaseSession.cs
  12. +1
    -2
      src/TensorFlowNET.Core/Sessions/FeedItem.cs
  13. +1
    -1
      src/TensorFlowNET.Core/Sessions/_ElementFetchMapper.cs
  14. +1
    -1
      src/TensorFlowNET.Core/Sessions/_FetchHandler.cs
  15. +1
    -1
      src/TensorFlowNET.Core/Sessions/_FetchMapper.cs
  16. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs
  17. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.cs
  18. +1
    -1
      src/TensorFlowNET.Core/Tensors/TensorShape.cs
  19. +1
    -1
      src/TensorFlowNET.Core/Tensors/constant_op.cs
  20. +5
    -7
      src/TensorFlowNET.Core/Tensors/tensor_util.cs
  21. +1
    -1
      src/TensorFlowNET.Core/Tensors/tf.constant.cs
  22. +1
    -1
      src/TensorFlowNET.Core/Variables/gen_state_ops.py.cs
  23. +2
    -4
      src/TensorFlowNET.Core/ops.py.cs
  24. +1
    -1
      test/TensorFlowNET.Examples/BasicOperations.cs
  25. +1
    -1
      test/TensorFlowNET.Examples/ImageRecognition.cs
  26. +1
    -1
      test/TensorFlowNET.Examples/InceptionArchGoogLeNet.cs
  27. +1
    -1
      test/TensorFlowNET.Examples/KMeansClustering.cs
  28. +1
    -1
      test/TensorFlowNET.Examples/LinearRegression.cs
  29. +1
    -2
      test/TensorFlowNET.Examples/LogisticRegression.cs
  30. +1
    -1
      test/TensorFlowNET.Examples/NaiveBayesClassifier.cs
  31. +4
    -3
      test/TensorFlowNET.Examples/NearestNeighbor.cs
  32. +1
    -0
      test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj
  33. +1
    -1
      test/TensorFlowNET.Examples/TextClassification/DataHelpers.cs
  34. +1
    -2
      test/TensorFlowNET.Examples/TextClassification/TextClassificationTrain.cs
  35. +3
    -3
      test/TensorFlowNET.Examples/TextClassification/TextClassificationWithMovieReviews.cs
  36. +1
    -1
      test/TensorFlowNET.Examples/Utility/DataSet.cs
  37. +1
    -3
      test/TensorFlowNET.Examples/Utility/MnistDataSet.cs
  38. +1
    -1
      test/TensorFlowNET.UnitTest/CApiGradientsTest.cs
  39. +1
    -2
      test/TensorFlowNET.UnitTest/CSession.cs
  40. +1
    -1
      test/TensorFlowNET.UnitTest/ConstantTest.cs
  41. +0
    -1
      test/TensorFlowNET.UnitTest/OperationsTest.cs
  42. +1
    -1
      test/TensorFlowNET.UnitTest/SessionTest.cs
  43. +1
    -1
      test/TensorFlowNET.UnitTest/TensorTest.cs
  44. +0
    -1
      test/TensorFlowNET.UnitTest/VariableTest.cs

+ 7
- 7
TensorFlow.NET.sln View File

@@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
# Visual Studio Version 16
VisualStudioVersion = 16.0.28729.10
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.UnitTest", "test\TensorFlowNET.UnitTest\TensorFlowNET.UnitTest.csproj", "{029A8CF1-CF95-4DCB-98AA-9D3D96A83B3E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.UnitTest", "test\TensorFlowNET.UnitTest\TensorFlowNET.UnitTest.csproj", "{029A8CF1-CF95-4DCB-98AA-9D3D96A83B3E}"
EndProject EndProject
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Core", "src\T
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Visualization", "src\TensorFlowNET.Visualization\TensorFlowNET.Visualization.csproj", "{0254BFF9-453C-4FE0-9609-3644559A79CE}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Visualization", "src\TensorFlowNET.Visualization\TensorFlowNET.Visualization.csproj", "{0254BFF9-453C-4FE0-9609-3644559A79CE}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Core", "..\NumSharp\src\NumSharp.Core\NumSharp.Core.csproj", "{647E7590-9B50-48D9-B9E2-47743E9EAA56}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NumSharp.Core", "..\NumSharp\src\NumSharp.Core\NumSharp.Core.csproj", "{7BCAA225-997B-4BB0-987A-153E1CD1896B}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -35,10 +35,10 @@ Global
{0254BFF9-453C-4FE0-9609-3644559A79CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {0254BFF9-453C-4FE0-9609-3644559A79CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0254BFF9-453C-4FE0-9609-3644559A79CE}.Release|Any CPU.ActiveCfg = Release|Any CPU {0254BFF9-453C-4FE0-9609-3644559A79CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0254BFF9-453C-4FE0-9609-3644559A79CE}.Release|Any CPU.Build.0 = Release|Any CPU {0254BFF9-453C-4FE0-9609-3644559A79CE}.Release|Any CPU.Build.0 = Release|Any CPU
{647E7590-9B50-48D9-B9E2-47743E9EAA56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{647E7590-9B50-48D9-B9E2-47743E9EAA56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{647E7590-9B50-48D9-B9E2-47743E9EAA56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{647E7590-9B50-48D9-B9E2-47743E9EAA56}.Release|Any CPU.Build.0 = Release|Any CPU
{7BCAA225-997B-4BB0-987A-153E1CD1896B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BCAA225-997B-4BB0-987A-153E1CD1896B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BCAA225-997B-4BB0-987A-153E1CD1896B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BCAA225-997B-4BB0-987A-153E1CD1896B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE


+ 1
- 1
src/TensorFlowNET.Core/APIs/tf.tile.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 2
src/TensorFlowNET.Core/Graphs/Graph.Operation.cs View File

@@ -1,5 +1,4 @@
using NumSharp.Core;
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;


+ 1
- 1
src/TensorFlowNET.Core/Keras/Sequence.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 1
src/TensorFlowNET.Core/Operations/array_ops.py.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 2
src/TensorFlowNET.Core/Operations/gen_array_ops.cs View File

@@ -1,9 +1,8 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Tensorflow;
using Tensorflow.Eager; using Tensorflow.Eager;


namespace Tensorflow namespace Tensorflow


+ 4
- 3
src/TensorFlowNET.Core/Operations/gen_math_ops.cs View File

@@ -1,5 +1,4 @@
using NumSharp.Core;
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
@@ -42,7 +41,9 @@ namespace Tensorflow
/// <summary> /// <summary>
/// Computes the mean of elements across dimensions of a tensor. /// Computes the mean of elements across dimensions of a tensor.
/// Reduces `input` along the dimensions given in `axis`. Unless /// `keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in /// `axis`. If `keep_dims` is true, the reduced dimensions are retained with length 1.
/// Reduces `input` along the dimensions given in `axis`. Unless
/// `keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in
/// `axis`. If `keep_dims` is true, the reduced dimensions are retained with length 1.
/// </summary> /// </summary>
/// <param name="input">A `Tensor`. Must be one of the following types: /// <param name="input">A `Tensor`. Must be one of the following types:
/// `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`. /// `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.


+ 1
- 1
src/TensorFlowNET.Core/Operations/math_ops.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Python.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;


+ 1
- 1
src/TensorFlowNET.Core/Sessions/BaseSession.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 2
src/TensorFlowNET.Core/Sessions/FeedItem.cs View File

@@ -1,5 +1,4 @@
using NumSharp.Core;
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;




+ 1
- 1
src/TensorFlowNET.Core/Sessions/_ElementFetchMapper.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Sessions/_FetchHandler.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Sessions/_FetchMapper.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 1
src/TensorFlowNET.Core/Tensors/Tensor.cs View File

@@ -1,5 +1,5 @@
//using Newtonsoft.Json; //using Newtonsoft.Json;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 1
src/TensorFlowNET.Core/Tensors/TensorShape.cs View File

@@ -1,5 +1,5 @@
using Google.Protobuf.Collections; using Google.Protobuf.Collections;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 1
src/TensorFlowNET.Core/Tensors/constant_op.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 5
- 7
src/TensorFlowNET.Core/Tensors/tensor_util.cs View File

@@ -1,10 +1,8 @@
using NumSharp.Core;
using NumSharp.Core.Interfaces;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using tensor_pb2 = Tensorflow;


namespace Tensorflow namespace Tensorflow
{ {
@@ -45,7 +43,7 @@ namespace Tensorflow
public static NDArray MakeNdarray(TensorProto tensor) public static NDArray MakeNdarray(TensorProto tensor)
{ {
var shape = tensor.TensorShape.Dim.Select(x => (int)x.Size).ToArray(); var shape = tensor.TensorShape.Dim.Select(x => (int)x.Size).ToArray();
long num_elements = np.prod(shape);
int num_elements = np.prod(shape);
var tensor_dtype = tensor.Dtype.as_numpy_dtype(); var tensor_dtype = tensor.Dtype.as_numpy_dtype();


if (tensor.TensorContent.Length > 0) if (tensor.TensorContent.Length > 0)
@@ -199,7 +197,7 @@ namespace Tensorflow
is_same_size = shape_size == nparray.size; is_same_size = shape_size == nparray.size;
} }


var tensor_proto = new tensor_pb2.TensorProto
var tensor_proto = new TensorProto
{ {
Dtype = numpy_dtype.as_datatype_enum(), Dtype = numpy_dtype.as_datatype_enum(),
TensorShape = tensor_util.as_shape(shape) TensorShape = tensor_util.as_shape(shape)
@@ -316,12 +314,12 @@ namespace Tensorflow
return new TensorShape(dims.Select(x => (int)x).ToArray()); return new TensorShape(dims.Select(x => (int)x).ToArray());
} }


public static TensorShape as_shape(this IShape shape)
public static TensorShape as_shape(this Shape shape)
{ {
return new TensorShape(shape.Dimensions); return new TensorShape(shape.Dimensions);
} }


public static TensorShape reshape(this IShape shape, int[] dims)
public static TensorShape reshape(this Shape shape, int[] dims)
{ {
return new TensorShape(dims); return new TensorShape(dims);
} }


+ 1
- 1
src/TensorFlowNET.Core/Tensors/tf.constant.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
src/TensorFlowNET.Core/Variables/gen_state_ops.py.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 2
- 4
src/TensorFlowNET.Core/ops.py.cs View File

@@ -4,12 +4,10 @@ using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using Tensorflow; using Tensorflow;
using node_def_pb2 = Tensorflow;
using Google.Protobuf; using Google.Protobuf;
using System.Linq; using System.Linq;
using NumSharp.Core;
using NumSharp;
using System.ComponentModel; using System.ComponentModel;
using Tensorflow.Gradients;


namespace Tensorflow namespace Tensorflow
{ {
@@ -176,7 +174,7 @@ namespace Tensorflow


public static NodeDef _NodeDef(string op_type, string name, string device = "", Dictionary<string, AttrValue> attrs = null) public static NodeDef _NodeDef(string op_type, string name, string device = "", Dictionary<string, AttrValue> attrs = null)
{ {
var node_def = new node_def_pb2.NodeDef();
var node_def = new NodeDef();
node_def.Op = op_type; node_def.Op = op_type;
node_def.Name = name; node_def.Name = name;




+ 1
- 1
test/TensorFlowNET.Examples/BasicOperations.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
test/TensorFlowNET.Examples/ImageRecognition.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;


+ 1
- 1
test/TensorFlowNET.Examples/InceptionArchGoogLeNet.cs View File

@@ -1,6 +1,6 @@
using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar; using ICSharpCode.SharpZipLib.Tar;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;


+ 1
- 1
test/TensorFlowNET.Examples/KMeansClustering.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
test/TensorFlowNET.Examples/LinearRegression.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 2
test/TensorFlowNET.Examples/LogisticRegression.cs View File

@@ -1,5 +1,4 @@
using Newtonsoft.Json;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;


+ 1
- 1
test/TensorFlowNET.Examples/NaiveBayesClassifier.cs View File

@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Tensorflow; using Tensorflow;
using NumSharp.Core;
using NumSharp;
using System.Linq; using System.Linq;


namespace TensorFlowNET.Examples namespace TensorFlowNET.Examples


+ 4
- 3
test/TensorFlowNET.Examples/NearestNeighbor.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@@ -47,9 +47,10 @@ namespace TensorFlowNET.Examples
// Get nearest neighbor // Get nearest neighbor
long nn_index = sess.run(pred, new FeedItem(xtr, Xtr), new FeedItem(xte, Xte[i])); long nn_index = sess.run(pred, new FeedItem(xtr, Xtr), new FeedItem(xte, Xte[i]));
// Get nearest neighbor class label and compare it to its true label // Get nearest neighbor class label and compare it to its true label
print($"Test {i} Prediction: {np.argmax(Ytr[nn_index])} True Class: {np.argmax(Yte[i] as NDArray)}");
int index = (int)nn_index;
print($"Test {i} Prediction: {np.argmax(Ytr[(NDArray)index])} True Class: {np.argmax(Yte[i] as NDArray)}");
// Calculate accuracy // Calculate accuracy
if (np.argmax(Ytr[nn_index]) == np.argmax(Yte[i] as NDArray))
if (np.argmax(Ytr[(NDArray)index]) == np.argmax(Yte[i] as NDArray))
accuracy += 1f/ Xte.shape[0]; accuracy += 1f/ Xte.shape[0];
} }




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

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


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




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

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;


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

@@ -1,5 +1,4 @@
using NumSharp.Core;
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;


+ 3
- 3
test/TensorFlowNET.Examples/TextClassification/TextClassificationWithMovieReviews.cs View File

@@ -2,10 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using Tensorflow; using Tensorflow;
using NumSharp.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using NumSharp;


namespace TensorFlowNET.Examples namespace TensorFlowNET.Examples
{ {
@@ -71,8 +71,8 @@ namespace TensorFlowNET.Examples
labels_test = labels_test[indices_test]; labels_test = labels_test[indices_test];


// not completed // not completed
var xs = x_train.hstack(x_test);
var labels = labels_train.hstack(labels_test);
var xs = x_train.hstack<int>(x_test);
var labels = labels_train.hstack<int>(labels_test);


var idx = x_train.size; var idx = x_train.size;
var y_train = labels_train; var y_train = labels_train;


+ 1
- 1
test/TensorFlowNET.Examples/Utility/DataSet.cs View File

@@ -1,4 +1,4 @@
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 3
test/TensorFlowNET.Examples/Utility/MnistDataSet.cs View File

@@ -1,6 +1,4 @@
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.GZip;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;


+ 1
- 1
test/TensorFlowNET.UnitTest/CApiGradientsTest.cs View File

@@ -1,5 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 1
- 2
test/TensorFlowNET.UnitTest/CSession.cs View File

@@ -1,5 +1,4 @@
using NumSharp.Core;
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;


+ 1
- 1
test/TensorFlowNET.UnitTest/ConstantTest.cs View File

@@ -1,5 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 0
- 1
test/TensorFlowNET.UnitTest/OperationsTest.cs View File

@@ -1,5 +1,4 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using NumSharp.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
test/TensorFlowNET.UnitTest/SessionTest.cs View File

@@ -1,5 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;


+ 1
- 1
test/TensorFlowNET.UnitTest/TensorTest.cs View File

@@ -1,5 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using NumSharp.Core;
using NumSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;


+ 0
- 1
test/TensorFlowNET.UnitTest/VariableTest.cs View File

@@ -3,7 +3,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Tensorflow; using Tensorflow;
using NumSharp.Core;


namespace TensorFlowNET.UnitTest namespace TensorFlowNET.UnitTest
{ {


Loading…
Cancel
Save