From 28155aa28f97f40f3ea55d3135cd1399ebeda673 Mon Sep 17 00:00:00 2001 From: Arnav Das Date: Mon, 13 May 2019 23:55:50 +0530 Subject: [PATCH 1/5] Makina Commit 1 --- TensorFlow.NET.sln | 22 ++- src/MakinaNET.Core/Core.cs | 15 +++ src/MakinaNET.Core/IInitializer.cs | 10 ++ .../Initializer/BaseInitializer.cs | 13 ++ src/MakinaNET.Core/Layers/Dense.cs | 57 ++++++++ src/MakinaNET.Core/Layers/ILayer.cs | 16 +++ src/MakinaNET.Core/MakinaNET.Core.csproj | 13 ++ src/MakinaNET.Core/Model.cs | 127 ++++++++++++++++++ src/MakinaNET.Example/App.config | 14 ++ .../MakinaNET.Example.csproj | 87 ++++++++++++ src/MakinaNET.Example/Program.cs | 67 +++++++++ .../Properties/AssemblyInfo.cs | 36 +++++ src/MakinaNET.Example/packages.config | 10 ++ src/MakinaNET.Test/BaseTests.cs | 23 ++++ src/MakinaNET.Test/MakinaNET.UnitTest.csproj | 98 ++++++++++++++ src/MakinaNET.Test/Properties/AssemblyInfo.cs | 20 +++ src/MakinaNET.Test/app.config | 11 ++ src/MakinaNET.Test/packages.config | 11 ++ 18 files changed, 648 insertions(+), 2 deletions(-) create mode 100644 src/MakinaNET.Core/Core.cs create mode 100644 src/MakinaNET.Core/IInitializer.cs create mode 100644 src/MakinaNET.Core/Initializer/BaseInitializer.cs create mode 100644 src/MakinaNET.Core/Layers/Dense.cs create mode 100644 src/MakinaNET.Core/Layers/ILayer.cs create mode 100644 src/MakinaNET.Core/MakinaNET.Core.csproj create mode 100644 src/MakinaNET.Core/Model.cs create mode 100644 src/MakinaNET.Example/App.config create mode 100644 src/MakinaNET.Example/MakinaNET.Example.csproj create mode 100644 src/MakinaNET.Example/Program.cs create mode 100644 src/MakinaNET.Example/Properties/AssemblyInfo.cs create mode 100644 src/MakinaNET.Example/packages.config create mode 100644 src/MakinaNET.Test/BaseTests.cs create mode 100644 src/MakinaNET.Test/MakinaNET.UnitTest.csproj create mode 100644 src/MakinaNET.Test/Properties/AssemblyInfo.cs create mode 100644 src/MakinaNET.Test/app.config create mode 100644 src/MakinaNET.Test/packages.config diff --git a/TensorFlow.NET.sln b/TensorFlow.NET.sln index b96f8203..069ae794 100644 --- a/TensorFlow.NET.sln +++ b/TensorFlow.NET.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28803.156 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.168 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.UnitTest", "test\TensorFlowNET.UnitTest\TensorFlowNET.UnitTest.csproj", "{029A8CF1-CF95-4DCB-98AA-9D3D96A83B3E}" EndProject @@ -9,6 +9,12 @@ 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}") = "MakinaNET.Core", "src\MakinaNET.Core\MakinaNET.Core.csproj", "{6FF518EB-523F-4930-919E-05011EFCED6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakinaNET.Example", "src\MakinaNET.Example\MakinaNET.Example.csproj", "{17E1AC16-9E0E-4545-905A-E92C6300C7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakinaNET.UnitTest", "src\MakinaNET.Test\MakinaNET.UnitTest.csproj", "{02F54D9F-617B-4B15-9D21-E21AF66693B1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +33,18 @@ 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 + {6FF518EB-523F-4930-919E-05011EFCED6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FF518EB-523F-4930-919E-05011EFCED6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FF518EB-523F-4930-919E-05011EFCED6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FF518EB-523F-4930-919E-05011EFCED6F}.Release|Any CPU.Build.0 = Release|Any CPU + {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/MakinaNET.Core/Core.cs b/src/MakinaNET.Core/Core.cs new file mode 100644 index 00000000..e8a07ebf --- /dev/null +++ b/src/MakinaNET.Core/Core.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Tensorflow; + +namespace Makina +{ + public static class Makina + { + public static Tensor create_tensor(int[] shape, float mean = 0, float stddev = 1, TF_DataType dtype = TF_DataType.TF_FLOAT, int? seed = null, string name = null) + { + return tf.truncated_normal(shape: shape, mean: mean, stddev: stddev, dtype: dtype, seed: seed, name: name); + } + } +} diff --git a/src/MakinaNET.Core/IInitializer.cs b/src/MakinaNET.Core/IInitializer.cs new file mode 100644 index 00000000..f60987a5 --- /dev/null +++ b/src/MakinaNET.Core/IInitializer.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Makina +{ + interface IInitializer + { + } +} diff --git a/src/MakinaNET.Core/Initializer/BaseInitializer.cs b/src/MakinaNET.Core/Initializer/BaseInitializer.cs new file mode 100644 index 00000000..31c301c6 --- /dev/null +++ b/src/MakinaNET.Core/Initializer/BaseInitializer.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Tensorflow; +using Tensorflow.Layers; + +namespace Makina.Initializer +{ + class BaseInitializer : IInitializer + { + public int seed; + } +} diff --git a/src/MakinaNET.Core/Layers/Dense.cs b/src/MakinaNET.Core/Layers/Dense.cs new file mode 100644 index 00000000..3196ff0d --- /dev/null +++ b/src/MakinaNET.Core/Layers/Dense.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using Tensorflow; +using static Makina.Makina; +using Makina; +using NumSharp; +using Tensorflow.Operations.Activation; + +namespace Makina.Layers +{ + public class Dense : ILayer + { + RefVariable W; + int units; + TensorShape WShape; + string name; + IActivation activation; + + public Dense(int units, string name = null, IActivation activation = null) + { + this.activation = activation; + this.units = units; + this.name = (string.IsNullOrEmpty(name) || string.IsNullOrWhiteSpace(name))?this.GetType().Name + "_" + this.GetType().GUID:name; + } + public ILayer __build__(TensorShape input_shape, int seed = 1, float stddev = -1f) + { + Console.WriteLine("Building Layer \"" + name + "\" ..."); + if (stddev == -1) + stddev = (float)(1 / Math.Sqrt(2)); + var dim = input_shape.Dimensions; + var input_dim = dim[dim.Length - 1]; + W = tf.Variable(create_tensor(new int[] { input_dim, units }, seed: seed, stddev: (float)stddev)); + WShape = new TensorShape(W.shape); + return this; + } + public Tensor __call__(Tensor x) + { + var dot = tf.matmul(x, W); + if (this.activation != null) + dot = activation.Activate(dot); + Console.WriteLine("Calling Layer \"" + name + "(" + np.array(dot.getShape().Dimensions).ToString() + ")\" ..."); + return dot; + } + public TensorShape __shape__() + { + return WShape; + } + public TensorShape output_shape(TensorShape input_shape) + { + var output_shape = input_shape.Dimensions; + output_shape[output_shape.Length - 1] = units; + return new TensorShape(output_shape); + } + } +} diff --git a/src/MakinaNET.Core/Layers/ILayer.cs b/src/MakinaNET.Core/Layers/ILayer.cs new file mode 100644 index 00000000..45e64ac6 --- /dev/null +++ b/src/MakinaNET.Core/Layers/ILayer.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Tensorflow; +using NumSharp; + +namespace Makina.Layers +{ + public interface ILayer + { + TensorShape __shape__(); + ILayer __build__(TensorShape input_shape, int seed = 1, float stddev = -1f); + Tensor __call__(Tensor x); + TensorShape output_shape(TensorShape input_shape); + } +} diff --git a/src/MakinaNET.Core/MakinaNET.Core.csproj b/src/MakinaNET.Core/MakinaNET.Core.csproj new file mode 100644 index 00000000..c844d9a1 --- /dev/null +++ b/src/MakinaNET.Core/MakinaNET.Core.csproj @@ -0,0 +1,13 @@ + + + + netstandard2.0 + Makina + Makina + + + + + + + diff --git a/src/MakinaNET.Core/Model.cs b/src/MakinaNET.Core/Model.cs new file mode 100644 index 00000000..5b682ba9 --- /dev/null +++ b/src/MakinaNET.Core/Model.cs @@ -0,0 +1,127 @@ +using Makina.Layers; +using NumSharp; +using System; +using System.Collections.Generic; +using System.Text; +using Tensorflow; +using static Makina.Makina; +using static Tensorflow.Python; + +namespace Makina +{ + public class Model + { + public Tensor Flow; + List layer_stack; + + public TensorShape InputShape; + + public Model() + { + layer_stack = new List(); + } + public Model Add(ILayer layer) + { + layer_stack.Add(layer); + return this; + } + public Model Add(IEnumerable layers) + { + layer_stack.AddRange(layers); + return this; + } + public Tensor getFlow() + { + try + { + return Flow; + } + catch (Exception ex) + { + return null; + } + } + public (Operation, Tensor, Tensor) make_graph(Tensor features, Tensor labels) + { + + // TODO : Creating Loss Functions And Optimizers..... + + #region Model Layers Graph + /* + var stddev = 1 / Math.Sqrt(2); + + var d1 = new Dense(num_hidden); + d1.__build__(features.getShape()); + var hidden_activations = tf.nn.relu(d1.__call__(features)); + + var d1_output = d1.output_shape(features.getShape()); + + + var d2 = new Dense(1); + d2.__build__(d1.output_shape(features.getShape()), seed: 17, stddev: (float)(1/ Math.Sqrt(num_hidden))); + var logits = d2.__call__(hidden_activations); + var predictions = tf.sigmoid(tf.squeeze(logits)); + */ + #endregion + + #region Model Graph Form Layer Stack + var flow_shape = features.getShape(); + Flow = features; + for (int i = 0; i < layer_stack.Count; i++) + { + layer_stack[i].__build__(flow_shape); + flow_shape = layer_stack[i].output_shape(flow_shape); + Flow = layer_stack[i].__call__(Flow); + } + var predictions = tf.sigmoid(tf.squeeze(Flow)); + + #endregion + + #region loss and optimizer + var loss = tf.reduce_mean(tf.square(predictions - tf.cast(labels, tf.float32)), name: "loss"); + + var gs = tf.Variable(0, trainable: false, name: "global_step"); + var train_op = tf.train.GradientDescentOptimizer(0.2f).minimize(loss, global_step: gs); + #endregion + + return (train_op, loss, gs); + } + public float train(int num_steps, (NDArray, NDArray) training_dataset) + { + var (X, Y) = training_dataset; + var x_shape = X.shape; + var batch_size = x_shape[0]; + var graph = tf.Graph().as_default(); + + var features = tf.placeholder(tf.float32, new TensorShape(batch_size, 2)); + var labels = tf.placeholder(tf.float32, new TensorShape(batch_size)); + + var (train_op, loss, gs) = this.make_graph(features, labels); + + var init = tf.global_variables_initializer(); + + float loss_value = 0; + with(tf.Session(graph), sess => + { + sess.run(init); + var step = 0; + + + while (step < num_steps) + { + var result = sess.run( + new ITensorOrOperation[] { train_op, gs, loss }, + new FeedItem(features, X), + new FeedItem(labels, Y)); + loss_value = result[2]; + step = result[1]; + if (step % 1000 == 0) + Console.WriteLine($"Step {step} loss: {loss_value}"); + } + Console.WriteLine($"Final loss: {loss_value}"); + }); + + return loss_value; + } + } +} diff --git a/src/MakinaNET.Example/App.config b/src/MakinaNET.Example/App.config new file mode 100644 index 00000000..11a40ce2 --- /dev/null +++ b/src/MakinaNET.Example/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/MakinaNET.Example/MakinaNET.Example.csproj b/src/MakinaNET.Example/MakinaNET.Example.csproj new file mode 100644 index 00000000..a3a596fc --- /dev/null +++ b/src/MakinaNET.Example/MakinaNET.Example.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {17E1AC16-9E0E-4545-905A-E92C6300C7AF} + Exe + Makina.Example + Makina.Example + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ArrayFire.0.0.2\lib\netstandard2.0\ArrayFire.dll + + + ..\packages\Google.Protobuf.3.7.0\lib\net45\Google.Protobuf.dll + + + ..\packages\NumSharp.0.10.0\lib\netstandard2.0\NumSharp.Core.dll + + + + ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll + + + + ..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + + + + + + + {6ff518eb-523f-4930-919e-05011efced6f} + MakinaNET.Core + + + {fd682ac0-7b2d-45d3-8b0d-c6d678b04144} + TensorFlowNET.Core + + + + \ No newline at end of file diff --git a/src/MakinaNET.Example/Program.cs b/src/MakinaNET.Example/Program.cs new file mode 100644 index 00000000..f68b5fe3 --- /dev/null +++ b/src/MakinaNET.Example/Program.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tensorflow; +using static Tensorflow.Python; +using static Makina.Makina; +using Makina.Layers; +using Makina; +using NumSharp; + +namespace Makina.Example +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("================================== Makina =================================="); + + #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(); + var Y = new List(); + 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())); + } + } +} diff --git a/src/MakinaNET.Example/Properties/AssemblyInfo.cs b/src/MakinaNET.Example/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..e1a21eb2 --- /dev/null +++ b/src/MakinaNET.Example/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Makina.Example")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Makina.Example")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("17e1ac16-9e0e-4545-905a-e92c6300c7af")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/MakinaNET.Example/packages.config b/src/MakinaNET.Example/packages.config new file mode 100644 index 00000000..1e1b6069 --- /dev/null +++ b/src/MakinaNET.Example/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/MakinaNET.Test/BaseTests.cs b/src/MakinaNET.Test/BaseTests.cs new file mode 100644 index 00000000..545e7a8a --- /dev/null +++ b/src/MakinaNET.Test/BaseTests.cs @@ -0,0 +1,23 @@ +using System; +using Tensorflow; +using Makina; +using Makina.Layers; +using NumSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Makina.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.getShape()); + var outputShape = dense_1.output_shape(input.getShape()); + //Assert.AreEqual(outputShape.Dimensions, new int[] { 1 }); + } + } +} diff --git a/src/MakinaNET.Test/MakinaNET.UnitTest.csproj b/src/MakinaNET.Test/MakinaNET.UnitTest.csproj new file mode 100644 index 00000000..1a744896 --- /dev/null +++ b/src/MakinaNET.Test/MakinaNET.UnitTest.csproj @@ -0,0 +1,98 @@ + + + + + + Debug + AnyCPU + {02F54D9F-617B-4B15-9D21-E21AF66693B1} + Library + Properties + MakinaNET.Test + MakinaNET.Test + v4.7.2 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\ArrayFire.0.0.2\lib\netstandard2.0\ArrayFire.dll + + + ..\..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + ..\..\packages\NumSharp.0.10.1\lib\netstandard2.0\NumSharp.Core.dll + + + + ..\..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll + + + + ..\..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll + + + + ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + + + + + {6ff518eb-523f-4930-919e-05011efced6f} + MakinaNET.Core + + + {fd682ac0-7b2d-45d3-8b0d-c6d678b04144} + TensorFlowNET.Core + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/src/MakinaNET.Test/Properties/AssemblyInfo.cs b/src/MakinaNET.Test/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..107f1cc6 --- /dev/null +++ b/src/MakinaNET.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Makina.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Makina.Test")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("02f54d9f-617b-4b15-9d21-e21af66693b1")] + +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/MakinaNET.Test/app.config b/src/MakinaNET.Test/app.config new file mode 100644 index 00000000..254c62f6 --- /dev/null +++ b/src/MakinaNET.Test/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/MakinaNET.Test/packages.config b/src/MakinaNET.Test/packages.config new file mode 100644 index 00000000..7e0fea67 --- /dev/null +++ b/src/MakinaNET.Test/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file From 2165f455c4fcb4b066fecd469da1e1d768d336d5 Mon Sep 17 00:00:00 2001 From: Arnav Das Date: Wed, 15 May 2019 20:51:03 +0530 Subject: [PATCH 2/5] Keras Commit --- TensorFlow.NET.sln | 22 ++--- src/{MakinaNET.Core => KerasNET.Core}/Core.cs | 4 +- .../IInitializer.cs | 2 +- .../Initializer/BaseInitializer.cs | 2 +- .../Keras.Core.csproj} | 4 +- .../Layers/Dense.cs | 6 +- .../Layers/ILayer.cs | 2 +- .../Model.cs | 6 +- src/MakinaNET.Test/MakinaNET.UnitTest.csproj | 98 ------------------- src/MakinaNET.Test/Properties/AssemblyInfo.cs | 20 ---- src/MakinaNET.Test/app.config | 11 --- .../KerasNET.Example}/App.config | 0 .../KerasNET.Example/Keras.Example.csproj | 8 +- .../KerasNET.Example}/Program.cs | 10 +- .../Properties/AssemblyInfo.cs | 4 +- .../KerasNET.Example}/packages.config | 0 .../KerasNET.Test}/BaseTests.cs | 13 ++- test/KerasNET.Test/Keras.UnitTest.csproj | 34 +++++++ .../KerasNET.Test}/packages.config | 0 19 files changed, 78 insertions(+), 168 deletions(-) rename src/{MakinaNET.Core => KerasNET.Core}/Core.cs (89%) rename src/{MakinaNET.Core => KerasNET.Core}/IInitializer.cs (87%) rename src/{MakinaNET.Core => KerasNET.Core}/Initializer/BaseInitializer.cs (87%) rename src/{MakinaNET.Core/MakinaNET.Core.csproj => KerasNET.Core/Keras.Core.csproj} (75%) rename src/{MakinaNET.Core => KerasNET.Core}/Layers/Dense.cs (96%) rename src/{MakinaNET.Core => KerasNET.Core}/Layers/ILayer.cs (93%) rename src/{MakinaNET.Core => KerasNET.Core}/Model.cs (98%) delete mode 100644 src/MakinaNET.Test/MakinaNET.UnitTest.csproj delete mode 100644 src/MakinaNET.Test/Properties/AssemblyInfo.cs delete mode 100644 src/MakinaNET.Test/app.config rename {src/MakinaNET.Example => test/KerasNET.Example}/App.config (100%) rename src/MakinaNET.Example/MakinaNET.Example.csproj => test/KerasNET.Example/Keras.Example.csproj (94%) rename {src/MakinaNET.Example => test/KerasNET.Example}/Program.cs (93%) rename {src/MakinaNET.Example => test/KerasNET.Example}/Properties/AssemblyInfo.cs (93%) rename {src/MakinaNET.Example => test/KerasNET.Example}/packages.config (100%) rename {src/MakinaNET.Test => test/KerasNET.Test}/BaseTests.cs (65%) create mode 100644 test/KerasNET.Test/Keras.UnitTest.csproj rename {src/MakinaNET.Test => test/KerasNET.Test}/packages.config (100%) diff --git a/TensorFlow.NET.sln b/TensorFlow.NET.sln index 069ae794..12b93519 100644 --- a/TensorFlow.NET.sln +++ b/TensorFlow.NET.sln @@ -9,11 +9,11 @@ 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}") = "MakinaNET.Core", "src\MakinaNET.Core\MakinaNET.Core.csproj", "{6FF518EB-523F-4930-919E-05011EFCED6F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Keras.Core", "src\KerasNET.Core\Keras.Core.csproj", "{902E188F-A953-43B4-9991-72BAB1697BC3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakinaNET.Example", "src\MakinaNET.Example\MakinaNET.Example.csproj", "{17E1AC16-9E0E-4545-905A-E92C6300C7AF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keras.Example", "test\KerasNET.Example\Keras.Example.csproj", "{17E1AC16-9E0E-4545-905A-E92C6300C7AF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakinaNET.UnitTest", "src\MakinaNET.Test\MakinaNET.UnitTest.csproj", "{02F54D9F-617B-4B15-9D21-E21AF66693B1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Keras.UnitTest", "test\KerasNET.Test\Keras.UnitTest.csproj", "{A5839A45-A117-4BEA-898B-DE1ED6E0D58F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,18 +33,18 @@ 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 - {6FF518EB-523F-4930-919E-05011EFCED6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6FF518EB-523F-4930-919E-05011EFCED6F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6FF518EB-523F-4930-919E-05011EFCED6F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6FF518EB-523F-4930-919E-05011EFCED6F}.Release|Any CPU.Build.0 = Release|Any CPU + {902E188F-A953-43B4-9991-72BAB1697BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {902E188F-A953-43B4-9991-72BAB1697BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {902E188F-A953-43B4-9991-72BAB1697BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {902E188F-A953-43B4-9991-72BAB1697BC3}.Release|Any CPU.Build.0 = Release|Any CPU {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {17E1AC16-9E0E-4545-905A-E92C6300C7AF}.Release|Any CPU.Build.0 = Release|Any CPU - {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02F54D9F-617B-4B15-9D21-E21AF66693B1}.Release|Any CPU.Build.0 = Release|Any CPU + {A5839A45-A117-4BEA-898B-DE1ED6E0D58F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5839A45-A117-4BEA-898B-DE1ED6E0D58F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5839A45-A117-4BEA-898B-DE1ED6E0D58F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5839A45-A117-4BEA-898B-DE1ED6E0D58F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/MakinaNET.Core/Core.cs b/src/KerasNET.Core/Core.cs similarity index 89% rename from src/MakinaNET.Core/Core.cs rename to src/KerasNET.Core/Core.cs index e8a07ebf..8adae938 100644 --- a/src/MakinaNET.Core/Core.cs +++ b/src/KerasNET.Core/Core.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Text; using Tensorflow; -namespace Makina +namespace Keras { - public static class Makina + public static class Keras { public static Tensor create_tensor(int[] shape, float mean = 0, float stddev = 1, TF_DataType dtype = TF_DataType.TF_FLOAT, int? seed = null, string name = null) { diff --git a/src/MakinaNET.Core/IInitializer.cs b/src/KerasNET.Core/IInitializer.cs similarity index 87% rename from src/MakinaNET.Core/IInitializer.cs rename to src/KerasNET.Core/IInitializer.cs index f60987a5..53cb9112 100644 --- a/src/MakinaNET.Core/IInitializer.cs +++ b/src/KerasNET.Core/IInitializer.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace Makina +namespace Keras { interface IInitializer { diff --git a/src/MakinaNET.Core/Initializer/BaseInitializer.cs b/src/KerasNET.Core/Initializer/BaseInitializer.cs similarity index 87% rename from src/MakinaNET.Core/Initializer/BaseInitializer.cs rename to src/KerasNET.Core/Initializer/BaseInitializer.cs index 31c301c6..84a420a7 100644 --- a/src/MakinaNET.Core/Initializer/BaseInitializer.cs +++ b/src/KerasNET.Core/Initializer/BaseInitializer.cs @@ -4,7 +4,7 @@ using System.Text; using Tensorflow; using Tensorflow.Layers; -namespace Makina.Initializer +namespace Keras.Initializer { class BaseInitializer : IInitializer { diff --git a/src/MakinaNET.Core/MakinaNET.Core.csproj b/src/KerasNET.Core/Keras.Core.csproj similarity index 75% rename from src/MakinaNET.Core/MakinaNET.Core.csproj rename to src/KerasNET.Core/Keras.Core.csproj index c844d9a1..3a7cfc6b 100644 --- a/src/MakinaNET.Core/MakinaNET.Core.csproj +++ b/src/KerasNET.Core/Keras.Core.csproj @@ -2,8 +2,8 @@ netstandard2.0 - Makina - Makina + Keras + Keras diff --git a/src/MakinaNET.Core/Layers/Dense.cs b/src/KerasNET.Core/Layers/Dense.cs similarity index 96% rename from src/MakinaNET.Core/Layers/Dense.cs rename to src/KerasNET.Core/Layers/Dense.cs index 3196ff0d..66569882 100644 --- a/src/MakinaNET.Core/Layers/Dense.cs +++ b/src/KerasNET.Core/Layers/Dense.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Text; using System.Linq; using Tensorflow; -using static Makina.Makina; -using Makina; +using static Keras.Keras; +using Keras; using NumSharp; using Tensorflow.Operations.Activation; -namespace Makina.Layers +namespace Keras.Layers { public class Dense : ILayer { diff --git a/src/MakinaNET.Core/Layers/ILayer.cs b/src/KerasNET.Core/Layers/ILayer.cs similarity index 93% rename from src/MakinaNET.Core/Layers/ILayer.cs rename to src/KerasNET.Core/Layers/ILayer.cs index 45e64ac6..2c033eef 100644 --- a/src/MakinaNET.Core/Layers/ILayer.cs +++ b/src/KerasNET.Core/Layers/ILayer.cs @@ -4,7 +4,7 @@ using System.Text; using Tensorflow; using NumSharp; -namespace Makina.Layers +namespace Keras.Layers { public interface ILayer { diff --git a/src/MakinaNET.Core/Model.cs b/src/KerasNET.Core/Model.cs similarity index 98% rename from src/MakinaNET.Core/Model.cs rename to src/KerasNET.Core/Model.cs index 5b682ba9..d1d889fc 100644 --- a/src/MakinaNET.Core/Model.cs +++ b/src/KerasNET.Core/Model.cs @@ -1,13 +1,13 @@ -using Makina.Layers; +using Keras.Layers; using NumSharp; using System; using System.Collections.Generic; using System.Text; using Tensorflow; -using static Makina.Makina; +using static Keras.Keras; using static Tensorflow.Python; -namespace Makina +namespace Keras { public class Model { diff --git a/src/MakinaNET.Test/MakinaNET.UnitTest.csproj b/src/MakinaNET.Test/MakinaNET.UnitTest.csproj deleted file mode 100644 index 1a744896..00000000 --- a/src/MakinaNET.Test/MakinaNET.UnitTest.csproj +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - Debug - AnyCPU - {02F54D9F-617B-4B15-9D21-E21AF66693B1} - Library - Properties - MakinaNET.Test - MakinaNET.Test - v4.7.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\ArrayFire.0.0.2\lib\netstandard2.0\ArrayFire.dll - - - ..\..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - ..\..\packages\NumSharp.0.10.1\lib\netstandard2.0\NumSharp.Core.dll - - - - ..\..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll - - - - ..\..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll - - - - ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - - - - - - {6ff518eb-523f-4930-919e-05011efced6f} - MakinaNET.Core - - - {fd682ac0-7b2d-45d3-8b0d-c6d678b04144} - TensorFlowNET.Core - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/src/MakinaNET.Test/Properties/AssemblyInfo.cs b/src/MakinaNET.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 107f1cc6..00000000 --- a/src/MakinaNET.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Makina.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Makina.Test")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("02f54d9f-617b-4b15-9d21-e21af66693b1")] - -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/MakinaNET.Test/app.config b/src/MakinaNET.Test/app.config deleted file mode 100644 index 254c62f6..00000000 --- a/src/MakinaNET.Test/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/MakinaNET.Example/App.config b/test/KerasNET.Example/App.config similarity index 100% rename from src/MakinaNET.Example/App.config rename to test/KerasNET.Example/App.config diff --git a/src/MakinaNET.Example/MakinaNET.Example.csproj b/test/KerasNET.Example/Keras.Example.csproj similarity index 94% rename from src/MakinaNET.Example/MakinaNET.Example.csproj rename to test/KerasNET.Example/Keras.Example.csproj index a3a596fc..f5986c92 100644 --- a/src/MakinaNET.Example/MakinaNET.Example.csproj +++ b/test/KerasNET.Example/Keras.Example.csproj @@ -74,11 +74,11 @@ - - {6ff518eb-523f-4930-919e-05011efced6f} - MakinaNET.Core + + {902e188f-a953-43b4-9991-72bab1697bc3} + Keras.Core - + {fd682ac0-7b2d-45d3-8b0d-c6d678b04144} TensorFlowNET.Core diff --git a/src/MakinaNET.Example/Program.cs b/test/KerasNET.Example/Program.cs similarity index 93% rename from src/MakinaNET.Example/Program.cs rename to test/KerasNET.Example/Program.cs index f68b5fe3..2fbf288c 100644 --- a/src/MakinaNET.Example/Program.cs +++ b/test/KerasNET.Example/Program.cs @@ -5,18 +5,18 @@ using System.Text; using System.Threading.Tasks; using Tensorflow; using static Tensorflow.Python; -using static Makina.Makina; -using Makina.Layers; -using Makina; +using static Keras.Keras; +using Keras.Layers; +using Keras; using NumSharp; -namespace Makina.Example +namespace Keras.Example { class Program { static void Main(string[] args) { - Console.WriteLine("================================== Makina =================================="); + Console.WriteLine("================================== Keras =================================="); #region data var batch_size = 1000; diff --git a/src/MakinaNET.Example/Properties/AssemblyInfo.cs b/test/KerasNET.Example/Properties/AssemblyInfo.cs similarity index 93% rename from src/MakinaNET.Example/Properties/AssemblyInfo.cs rename to test/KerasNET.Example/Properties/AssemblyInfo.cs index e1a21eb2..772c5031 100644 --- a/src/MakinaNET.Example/Properties/AssemblyInfo.cs +++ b/test/KerasNET.Example/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Makina.Example")] +[assembly: AssemblyTitle("Keras.Example")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Makina.Example")] +[assembly: AssemblyProduct("Keras.Example")] [assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/MakinaNET.Example/packages.config b/test/KerasNET.Example/packages.config similarity index 100% rename from src/MakinaNET.Example/packages.config rename to test/KerasNET.Example/packages.config diff --git a/src/MakinaNET.Test/BaseTests.cs b/test/KerasNET.Test/BaseTests.cs similarity index 65% rename from src/MakinaNET.Test/BaseTests.cs rename to test/KerasNET.Test/BaseTests.cs index 545e7a8a..6a716c5f 100644 --- a/src/MakinaNET.Test/BaseTests.cs +++ b/test/KerasNET.Test/BaseTests.cs @@ -1,11 +1,11 @@ using System; using Tensorflow; -using Makina; -using Makina.Layers; +using Keras; +using Keras.Layers; using NumSharp; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Makina.Test +namespace Keras.Test { [TestClass] public class BaseTests @@ -17,7 +17,12 @@ namespace Makina.Test var input = new Tensor(np.array(new int[] { 3 })); dense_1.__build__(input.getShape()); var outputShape = dense_1.output_shape(input.getShape()); - //Assert.AreEqual(outputShape.Dimensions, new int[] { 1 }); + 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)); } } } diff --git a/test/KerasNET.Test/Keras.UnitTest.csproj b/test/KerasNET.Test/Keras.UnitTest.csproj new file mode 100644 index 00000000..e2a0e357 --- /dev/null +++ b/test/KerasNET.Test/Keras.UnitTest.csproj @@ -0,0 +1,34 @@ + + + + netcoreapp2.2 + + false + + Keras.UnitTest + + Keras.UnitTest + + + + DEBUG;TRACE + true + + + + true + + + + + + + + + + + + + + + diff --git a/src/MakinaNET.Test/packages.config b/test/KerasNET.Test/packages.config similarity index 100% rename from src/MakinaNET.Test/packages.config rename to test/KerasNET.Test/packages.config From e8623bd3d0581ba2d31b262890b20dd40319fe0c Mon Sep 17 00:00:00 2001 From: Arnav Das Date: Wed, 15 May 2019 21:22:21 +0530 Subject: [PATCH 3/5] Keras Commit --- test/KerasNET.Example/Keras.Example.csproj | 4 ++-- test/KerasNET.Example/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/KerasNET.Example/Keras.Example.csproj b/test/KerasNET.Example/Keras.Example.csproj index f5986c92..9b9828e3 100644 --- a/test/KerasNET.Example/Keras.Example.csproj +++ b/test/KerasNET.Example/Keras.Example.csproj @@ -40,8 +40,8 @@ ..\packages\Google.Protobuf.3.7.0\lib\net45\Google.Protobuf.dll - - ..\packages\NumSharp.0.10.0\lib\netstandard2.0\NumSharp.Core.dll + + ..\..\packages\NumSharp.0.10.1\lib\netstandard2.0\NumSharp.Core.dll diff --git a/test/KerasNET.Example/packages.config b/test/KerasNET.Example/packages.config index 1e1b6069..e7c17277 100644 --- a/test/KerasNET.Example/packages.config +++ b/test/KerasNET.Example/packages.config @@ -2,7 +2,7 @@ - + From 30862b179b7b30a2bf87b52453077e116f83e7c7 Mon Sep 17 00:00:00 2001 From: Arnav Das Date: Wed, 15 May 2019 21:38:21 +0530 Subject: [PATCH 4/5] Keras Commit --- test/KerasNET.Example/App.config | 14 --- test/KerasNET.Example/Keras.Example.csproj | 92 +++---------------- .../Properties/AssemblyInfo.cs | 36 -------- 3 files changed, 13 insertions(+), 129 deletions(-) delete mode 100644 test/KerasNET.Example/App.config delete mode 100644 test/KerasNET.Example/Properties/AssemblyInfo.cs diff --git a/test/KerasNET.Example/App.config b/test/KerasNET.Example/App.config deleted file mode 100644 index 11a40ce2..00000000 --- a/test/KerasNET.Example/App.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/KerasNET.Example/Keras.Example.csproj b/test/KerasNET.Example/Keras.Example.csproj index 9b9828e3..b7037eda 100644 --- a/test/KerasNET.Example/Keras.Example.csproj +++ b/test/KerasNET.Example/Keras.Example.csproj @@ -1,87 +1,21 @@ - - - + + - Debug - AnyCPU - {17E1AC16-9E0E-4545-905A-E92C6300C7AF} Exe - Makina.Example - Makina.Example - v4.7.2 - 512 - true - true + netcoreapp2.2 + false - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\ArrayFire.0.0.2\lib\netstandard2.0\ArrayFire.dll - - - ..\packages\Google.Protobuf.3.7.0\lib\net45\Google.Protobuf.dll - - - ..\..\packages\NumSharp.0.10.1\lib\netstandard2.0\NumSharp.Core.dll - - - - ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll - - - - ..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - - - - - + - - + + + + + - - {902e188f-a953-43b4-9991-72bab1697bc3} - Keras.Core - - - {fd682ac0-7b2d-45d3-8b0d-c6d678b04144} - TensorFlowNET.Core - + + - + \ No newline at end of file diff --git a/test/KerasNET.Example/Properties/AssemblyInfo.cs b/test/KerasNET.Example/Properties/AssemblyInfo.cs deleted file mode 100644 index 772c5031..00000000 --- a/test/KerasNET.Example/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Keras.Example")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Keras.Example")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("17e1ac16-9e0e-4545-905a-e92c6300c7af")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] From 206db69420354bc4f72ef35eb2bfd55ed8e946ef Mon Sep 17 00:00:00 2001 From: Arnav Das Date: Thu, 16 May 2019 04:32:26 +0530 Subject: [PATCH 5/5] Keras Commit --- test/KerasNET.Example/Keras.Example.csproj | 1 + test/KerasNET.Test/Keras.UnitTest.csproj | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/test/KerasNET.Example/Keras.Example.csproj b/test/KerasNET.Example/Keras.Example.csproj index b7037eda..44bf52a4 100644 --- a/test/KerasNET.Example/Keras.Example.csproj +++ b/test/KerasNET.Example/Keras.Example.csproj @@ -4,6 +4,7 @@ Exe netcoreapp2.2 false + Keras.Example.Program diff --git a/test/KerasNET.Test/Keras.UnitTest.csproj b/test/KerasNET.Test/Keras.UnitTest.csproj index e2a0e357..89a5425c 100644 --- a/test/KerasNET.Test/Keras.UnitTest.csproj +++ b/test/KerasNET.Test/Keras.UnitTest.csproj @@ -8,6 +8,12 @@ Keras.UnitTest Keras.UnitTest + + + + Exe + +