Browse Source

remove unnecessary projects (#316)

tags/v0.12
Esther Hu Haiping 6 years ago
parent
commit
83361f7c97
9 changed files with 20 additions and 199 deletions
  1. +20
    -0
      src/TensorFlowNet.Benchmarks/TensorFlowNET.Benchmark.csproj
  2. +0
    -23
      test/KerasNET.Example/Keras.Example.csproj
  3. +0
    -61
      test/KerasNET.Example/Keras.cs
  4. +0
    -10
      test/KerasNET.Example/packages.config
  5. +0
    -40
      test/KerasNET.Test/Keras.UnitTest.csproj
  6. +0
    -26
      test/KerasNET.Test/KerasTests.cs
  7. +0
    -11
      test/KerasNET.Test/packages.config
  8. +0
    -12
      test/TensorFlowHub.Examples/Program.cs
  9. +0
    -16
      test/TensorFlowHub.Examples/TensorFlowHub.Examples.csproj

+ 20
- 0
src/TensorFlowNet.Benchmarks/TensorFlowNET.Benchmark.csproj View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="tensorflow.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.11.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TensorFlowNET.Core\TensorFlowNET.Core.csproj" />
</ItemGroup>
</Project>

+ 0
- 23
test/KerasNET.Example/Keras.Example.csproj View File

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

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<StartupObject>Keras.Example.Program</StartupObject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Colorful.Console" Version="1.2.9" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.14.0" />
<PackageReference Include="SharpZipLib" Version="1.1.0" />
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
</ItemGroup>

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

</Project>

+ 0
- 61
test/KerasNET.Example/Keras.cs View File

@@ -1,61 +0,0 @@
using System;
using System.Collections.Generic;
using Tensorflow;
using Keras.Layers;
using NumSharp;

namespace Keras.Example
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("================================== Keras ==================================");

#region data
var batch_size = 1000;
var (X, Y) = XOR(batch_size);
//var (X, Y, batch_size) = (np.array(new float[,]{{1, 0 },{1, 1 },{0, 0 },{0, 1 }}), np.array(new int[] { 0, 1, 1, 0 }), 4);
#endregion

#region features
var (features, labels) = (new Tensor(X), new Tensor(Y));
var num_steps = 10000;
#endregion

#region model
var m = new Model();
//m.Add(new Dense(8, name: "Hidden", activation: tf.nn.relu())).Add(new Dense(1, name:"Output"));

m.Add(
new ILayer[] {
new Dense(8, name: "Hidden_1", activation: tf.nn.relu()),
new Dense(1, name: "Output")
});

m.train(num_steps, (X, Y));
#endregion

Console.ReadKey();
}
static (NDArray, NDArray) XOR(int samples)
{
var X = new List<float[]>();
var Y = new List<float>();
var r = new Random();
for (int i = 0; i < samples; i++)
{
var x1 = (float)r.Next(0, 2);
var x2 = (float)r.Next(0, 2);
var y = 0.0f;
if (x1 == x2)
y = 1.0f;
X.Add(new float[] { x1, x2 });
Y.Add(y);
}
return (np.array(X.ToArray()), np.array(Y.ToArray()));
}
}
}

+ 0
- 10
test/KerasNET.Example/packages.config View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ArrayFire" version="0.0.2" targetFramework="net472" />
<package id="Google.Protobuf" version="3.7.0" targetFramework="net472" />
<package id="NumSharp" version="0.10.1" targetFramework="net472" />
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
<package id="System.Memory" version="4.5.2" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
</packages>

+ 0
- 40
test/KerasNET.Test/Keras.UnitTest.csproj View File

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

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>

<IsPackable>false</IsPackable>

<AssemblyName>Keras.UnitTest</AssemblyName>

<RootNamespace>Keras.UnitTest</RootNamespace>

<ApplicationIcon />

<OutputType>Exe</OutputType>

<StartupObject />
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.14.0" />
</ItemGroup>

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

</Project>

+ 0
- 26
test/KerasNET.Test/KerasTests.cs View File

@@ -1,26 +0,0 @@
using Tensorflow;
using Keras.Layers;
using NumSharp;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Keras.Test
{
[TestClass]
public class BaseTests
{
[TestMethod]
public void Dense_Tensor_ShapeTest()
{
var dense_1 = new Dense(1, name: "dense_1", activation: tf.nn.relu());
var input = new Tensor(np.array(new int[] { 3 }));
dense_1.__build__(input.TensorShape);
var outputShape = dense_1.output_shape(input.TensorShape);
var a = (int[])(outputShape.Dimensions);
var b = (int[])(new int[] { 1 });
var _a = np.array(a);
var _b = np.array(b);

Assert.IsTrue(np.array_equal(_a, _b));
}
}
}

+ 0
- 11
test/KerasNET.Test/packages.config View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ArrayFire" version="0.0.2" targetFramework="net472" />
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net472" />
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net472" />
<package id="NumSharp" version="0.10.1" targetFramework="net472" />
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
<package id="System.Memory" version="4.5.2" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
</packages>

+ 0
- 12
test/TensorFlowHub.Examples/Program.cs View File

@@ -1,12 +0,0 @@
using System;

namespace TensorFlowHub.Examples
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

+ 0
- 16
test/TensorFlowHub.Examples/TensorFlowHub.Examples.csproj View File

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

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.14.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\TensorFlowHub\TensorFlowHub.csproj" />
</ItemGroup>

</Project>

Loading…
Cancel
Save