@@ -9,7 +9,7 @@ | |||||
[](https://996.icu/#/en_US) | [](https://996.icu/#/en_US) | ||||
[](https://mybinder.org/v2/gh/javiercp/BinderTF.NET/master?urlpath=lab) | [](https://mybinder.org/v2/gh/javiercp/BinderTF.NET/master?urlpath=lab) | ||||
*master branch is based on tensorflow 2.3 now, v0.15-tensorflow1.15 is from tensorflow1.15.* | |||||
*master branch is based on tensorflow v2.4, v0.3x branch is based on tensorflow v2.3, v0.15-tensorflow1.15 is from tensorflow1.15.* | |||||
 |  | ||||
@@ -30,7 +30,8 @@ Go through the online docs [TensorFlow for .NET](https://scisharp.github.io/tens | |||||
| TensorFlow | tf native1.14, cuda 10.0 | tf native 1.15, cuda 10.0 | tf native 2.3, cuda 10.1 | tf native 2.4, cuda 11 | | | TensorFlow | tf native1.14, cuda 10.0 | tf native 1.15, cuda 10.0 | tf native 2.3, cuda 10.1 | tf native 2.4, cuda 11 | | ||||
| -------------------------- | ------------- | -------------- | ------------- | ------------- | | | -------------------------- | ------------- | -------------- | ------------- | ------------- | | ||||
| tf.net 0.3x, tf.keras 0.2 | | | x | not compatible | | |||||
| tf.net 0.4x, tf.keras 0.5 | | | | x | | |||||
| tf.net 0.3x, tf.keras 0.4 | | | x | | | |||||
| tf.net 0.2x | | x | x | | | | tf.net 0.2x | | x | x | | | ||||
| tf.net 0.15 | x | x | | | | | tf.net 0.15 | x | x | | | | ||||
| tf.net 0.14 | x | | | | | | tf.net 0.14 | x | | | | | ||||
@@ -50,10 +51,10 @@ PM> Install-Package TensorFlow.Keras | |||||
### Install tensorflow binary | ### Install tensorflow binary | ||||
### For CPU version | ### For CPU version | ||||
PM> Install-Package SciSharp.TensorFlow.Redist -Version 2.3.1 | |||||
PM> Install-Package SciSharp.TensorFlow.Redist | |||||
### For GPU version (CUDA and cuDNN are required) | ### For GPU version (CUDA and cuDNN are required) | ||||
PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU -Version 2.3.1 | |||||
PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU | |||||
``` | ``` | ||||
Import TF.NET and Keras API in your project. | Import TF.NET and Keras API in your project. | ||||
@@ -11,6 +11,7 @@ | |||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||||
<DefineConstants>TRACE;DEBUG</DefineConstants> | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||||
<PlatformTarget>x64</PlatformTarget> | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -39,7 +39,7 @@ namespace Tensorflow | |||||
=> math_ops.matmul(a, b); | => math_ops.matmul(a, b); | ||||
public Tensor batch_matmul(Tensor x, Tensor y, bool adj_x = false, bool adj_y = false, string name = null) | public Tensor batch_matmul(Tensor x, Tensor y, bool adj_x = false, bool adj_y = false, string name = null) | ||||
=> tf.Context.ExecuteOp("BatchMatMul", name, new ExecuteOpArgs(x, y).SetAttributes(new { adj_x, adj_y })); | |||||
=> math_ops.batch_matmul(x, y, adj_x: adj_x, adj_y: adj_y, name: name); | |||||
} | } | ||||
public Tensor diag(Tensor diagonal, string name = null) | public Tensor diag(Tensor diagonal, string name = null) | ||||
@@ -74,6 +74,6 @@ namespace Tensorflow | |||||
/// <param name="name"></param> | /// <param name="name"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public Tensor batch_matmul(Tensor x, Tensor y, bool adj_x = false, bool adj_y = false, string name = null) | public Tensor batch_matmul(Tensor x, Tensor y, bool adj_x = false, bool adj_y = false, string name = null) | ||||
=> tf.Context.ExecuteOp("BatchMatMul", name, new ExecuteOpArgs(x, y).SetAttributes(new { adj_x, adj_y })); | |||||
=> math_ops.batch_matmul(x, y, adj_x: adj_x, adj_y: adj_y, name: name); | |||||
} | } | ||||
} | } |
@@ -796,22 +796,17 @@ namespace Tensorflow | |||||
public static Tensor batch_matmul(Tensor x, Tensor y, | public static Tensor batch_matmul(Tensor x, Tensor y, | ||||
bool adj_x = false, bool adj_y = false, | bool adj_x = false, bool adj_y = false, | ||||
string name = null) | string name = null) | ||||
{ | |||||
Tensor result = null; | |||||
tf_with(ops.name_scope(name, "MatMul", new Tensor[] { x, y }), scope => | |||||
=> tf_with(ops.name_scope(name, "MatMul", new Tensor[] { x, y }), scope => | |||||
{ | { | ||||
name = scope; | name = scope; | ||||
x = ops.convert_to_tensor(x, name: "a"); | x = ops.convert_to_tensor(x, name: "a"); | ||||
y = ops.convert_to_tensor(y, name: "b"); | y = ops.convert_to_tensor(y, name: "b"); | ||||
result = math_ops.batch_matmul(x, y, adj_x, adj_y, name); | |||||
return tf.Context.ExecuteOp("BatchMatMul", name, new ExecuteOpArgs(x, y) | |||||
.SetAttributes(new { adj_x, adj_y })); | |||||
}); | }); | ||||
return result; | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// Returns the complex conjugate of a complex number. | /// Returns the complex conjugate of a complex number. | ||||
/// </summary> | /// </summary> | ||||
@@ -6,7 +6,7 @@ | |||||
<LangVersion>8.0</LangVersion> | <LangVersion>8.0</LangVersion> | ||||
<RootNamespace>Tensorflow.Keras</RootNamespace> | <RootNamespace>Tensorflow.Keras</RootNamespace> | ||||
<Platforms>AnyCPU;x64</Platforms> | <Platforms>AnyCPU;x64</Platforms> | ||||
<Version>0.4.1</Version> | |||||
<Version>0.5.0</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 2020</Copyright> | <Copyright>Apache 2.0, Haiping Chen 2020</Copyright> | ||||
@@ -23,7 +23,8 @@ | |||||
* Implemented backward_function. | * Implemented backward_function. | ||||
* Support model.load_weights. | * Support model.load_weights. | ||||
* Add Subtract layer | * Add Subtract layer | ||||
* Support YOLOv3 model.</PackageReleaseNotes> | |||||
* Support YOLOv3 model. | |||||
* Text preprocessing</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> | ||||
@@ -34,8 +35,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.4.1.0</AssemblyVersion> | |||||
<FileVersion>0.4.1.0</FileVersion> | |||||
<AssemblyVersion>0.5.0.0</AssemblyVersion> | |||||
<FileVersion>0.5.0.0</FileVersion> | |||||
<PackageLicenseFile>LICENSE</PackageLicenseFile> | <PackageLicenseFile>LICENSE</PackageLicenseFile> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
@@ -9,6 +9,7 @@ | |||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||||
<PlatformTarget>x64</PlatformTarget> | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||||