| @@ -7,7 +7,7 @@ | |||||
| <Nullable>enable</Nullable> | <Nullable>enable</Nullable> | ||||
| <RootNamespace>Tensorflow.Keras</RootNamespace> | <RootNamespace>Tensorflow.Keras</RootNamespace> | ||||
| <Platforms>AnyCPU;x64</Platforms> | <Platforms>AnyCPU;x64</Platforms> | ||||
| <Version>0.6.3</Version> | |||||
| <Version>0.6.4</Version> | |||||
| <Authors>Haiping Chen</Authors> | <Authors>Haiping Chen</Authors> | ||||
| <Product>Keras for .NET</Product> | <Product>Keras for .NET</Product> | ||||
| <Copyright>Apache 2.0, Haiping Chen 2021</Copyright> | <Copyright>Apache 2.0, Haiping Chen 2021</Copyright> | ||||
| @@ -24,9 +24,9 @@ | |||||
| * Implemented backward_function. | * Implemented backward_function. | ||||
| * Support model.load_weights. | * Support model.load_weights. | ||||
| * Add Subtract layer | * Add Subtract layer | ||||
| * Support YOLOv3 model. | |||||
| * Text preprocessing | * Text preprocessing | ||||
| * Preprocessing.timeseries_dataset_from_array</PackageReleaseNotes> | |||||
| * Preprocessing.timeseries_dataset_from_array | |||||
| * Fixed memory leak for YOLOv3 model.</PackageReleaseNotes> | |||||
| <Description>Keras for .NET | <Description>Keras for .NET | ||||
| Keras is an API designed for human beings, not machines. Keras follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear & actionable error messages.</Description> | Keras is an API designed for human beings, not machines. Keras follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear & actionable error messages.</Description> | ||||
| @@ -37,8 +37,8 @@ Keras is an API designed for human beings, not machines. Keras follows best prac | |||||
| <RepositoryType>Git</RepositoryType> | <RepositoryType>Git</RepositoryType> | ||||
| <SignAssembly>true</SignAssembly> | <SignAssembly>true</SignAssembly> | ||||
| <AssemblyOriginatorKeyFile>Open.snk</AssemblyOriginatorKeyFile> | <AssemblyOriginatorKeyFile>Open.snk</AssemblyOriginatorKeyFile> | ||||
| <AssemblyVersion>0.6.3.0</AssemblyVersion> | |||||
| <FileVersion>0.6.3.0</FileVersion> | |||||
| <AssemblyVersion>0.6.4.0</AssemblyVersion> | |||||
| <FileVersion>0.6.4.0</FileVersion> | |||||
| <PackageLicenseFile>LICENSE</PackageLicenseFile> | <PackageLicenseFile>LICENSE</PackageLicenseFile> | ||||
| </PropertyGroup> | </PropertyGroup> | ||||
| @@ -109,9 +109,6 @@ namespace TensorFlowNET.UnitTest | |||||
| [TestMethod] | [TestMethod] | ||||
| public void TensorCreation() | public void TensorCreation() | ||||
| { | { | ||||
| //lock (Locks.ProcessWide) | |||||
| // tf.Session(); //create one to increase next id to 1. | |||||
| MultiThreadedUnitTestExecuter.Run(8, Core); | MultiThreadedUnitTestExecuter.Run(8, Core); | ||||
| //the core method | //the core method | ||||
| @@ -131,9 +128,6 @@ namespace TensorFlowNET.UnitTest | |||||
| [TestMethod] | [TestMethod] | ||||
| public void TensorCreation_Array() | public void TensorCreation_Array() | ||||
| { | { | ||||
| //lock (Locks.ProcessWide) | |||||
| // tf.Session(); //create one to increase next id to 1. | |||||
| MultiThreadedUnitTestExecuter.Run(8, Core); | MultiThreadedUnitTestExecuter.Run(8, Core); | ||||
| //the core method | //the core method | ||||
| @@ -150,33 +144,6 @@ namespace TensorFlowNET.UnitTest | |||||
| } | } | ||||
| } | } | ||||
| [TestMethod] | |||||
| public void TensorCreation_Undressed() | |||||
| { | |||||
| //lock (Locks.ProcessWide) | |||||
| // tf.Session(); //create one to increase next id to 1. | |||||
| MultiThreadedUnitTestExecuter.Run(8, Core); | |||||
| //the core method | |||||
| unsafe void Core(int tid) | |||||
| { | |||||
| using (var sess = tf.Session()) | |||||
| { | |||||
| for (int i = 0; i < 100; i++) | |||||
| { | |||||
| var v = (int*)Marshal.AllocHGlobal(sizeof(int)); | |||||
| c_api.DeallocatorArgs _deallocatorArgs = new c_api.DeallocatorArgs(); | |||||
| var handle = c_api.TF_NewTensor(typeof(int).as_tf_dtype(), dims: new long[0], num_dims: 0, | |||||
| data: (IntPtr)v, len: (UIntPtr)sizeof(int), | |||||
| deallocator: (IntPtr data, IntPtr size, ref c_api.DeallocatorArgs args) => Marshal.FreeHGlobal(data), | |||||
| ref _deallocatorArgs); | |||||
| c_api.TF_DeleteTensor(handle); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| [TestMethod] | [TestMethod] | ||||
| public void SessionRun() | public void SessionRun() | ||||
| { | { | ||||
| @@ -15,7 +15,7 @@ | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
| <AllowUnsafeBlocks>false</AllowUnsafeBlocks> | |||||
| </PropertyGroup> | </PropertyGroup> | ||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||||
| @@ -24,6 +24,10 @@ | |||||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||||
| </PropertyGroup> | </PropertyGroup> | ||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |||||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | <ItemGroup> | ||||
| <None Remove="Lite\testdata\add.bin" /> | <None Remove="Lite\testdata\add.bin" /> | ||||
| <None Remove="Lite\testdata\add_quantized.bin" /> | <None Remove="Lite\testdata\add_quantized.bin" /> | ||||