Browse Source

Release v0.110.1.

tags/v0.110.4-Transformer-Model
Haiping Chen 2 years ago
parent
commit
42e8b046ea
6 changed files with 18 additions and 32 deletions
  1. +1
    -2
      src/TensorFlowNET.Core/APIs/tf.array.cs
  2. +1
    -15
      src/TensorFlowNET.Core/Operations/array_ops.cs
  3. +3
    -8
      src/TensorFlowNET.Core/Operations/math_ops.cs
  4. +3
    -3
      src/TensorFlowNET.Core/Tensorflow.Binding.csproj
  5. +7
    -1
      src/TensorFlowNET.Core/ops.cs
  6. +3
    -3
      src/TensorFlowNET.Keras/Tensorflow.Keras.csproj

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

@@ -91,8 +91,7 @@ namespace Tensorflow
return identity(values.First(), name: scope); return identity(values.First(), name: scope);
}); });
} }

return gen_array_ops.concat_v2(values.ToArray(), ops.convert_to_tensor(axis), name: name);
return array_ops.concat(values.ToArray(), axis, name: name);
} }


/// <summary> /// <summary>


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

@@ -892,23 +892,9 @@ namespace Tensorflow
/// <param name="axis"></param> /// <param name="axis"></param>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
public static Tensor concat(Tensor[] values, int axis, string name = "concat")
{
if (values.Length == 1) // Degenerate case of one tensor.
{
return tf_with(ops.name_scope(name), scope =>
{
var t = ops.convert_to_tensor(axis, name: "concat_dim", dtype: TF_DataType.TF_INT32);
return identity(values[0], name: scope);
});
}

return gen_array_ops.concat_v2(values, ops.convert_to_tensor(axis), name: name);
}

public static Tensor concat(Tensor[] values, Tensor axis, string name = "concat") public static Tensor concat(Tensor[] values, Tensor axis, string name = "concat")
{ {
return gen_array_ops.concat_v2(values, axis, name: name);
return tf.Context.ExecuteOp("ConcatV2", name, new ExecuteOpArgs(values, axis));
} }


public static Tensor concat(object[] values, int axis, string name = "concat") public static Tensor concat(object[] values, int axis, string name = "concat")


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

@@ -791,10 +791,7 @@ namespace Tensorflow
bool adjoint_a = false, bool adjoint_b = false, bool adjoint_a = false, bool adjoint_b = false,
bool a_is_sparse = false, bool b_is_sparse = false, bool a_is_sparse = false, bool b_is_sparse = false,
string name = null) string name = null)
{
Tensor result = null;

tf_with(ops.name_scope(name, "MatMul", new Tensor[] { a, b }), scope =>
=> tf_with(ops.name_scope(name, "MatMul", (a, b)), scope =>
{ {
name = scope; name = scope;


@@ -815,12 +812,10 @@ namespace Tensorflow
transpose_b = true; transpose_b = true;
} }


result = gen_math_ops.mat_mul(a, b, transpose_a, transpose_b, name);
return tf.Context.ExecuteOp("MatMul", name, new ExecuteOpArgs(a, b)
.SetAttributes(new { transpose_a, transpose_b }));
}); });


return result;
}

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)


+ 3
- 3
src/TensorFlowNET.Core/Tensorflow.Binding.csproj View File

@@ -5,7 +5,7 @@
<AssemblyName>Tensorflow.Binding</AssemblyName> <AssemblyName>Tensorflow.Binding</AssemblyName>
<RootNamespace>Tensorflow</RootNamespace> <RootNamespace>Tensorflow</RootNamespace>
<TargetTensorFlow>2.10.0</TargetTensorFlow> <TargetTensorFlow>2.10.0</TargetTensorFlow>
<Version>0.110.0</Version>
<Version>0.110.1</Version>
<LangVersion>10.0</LangVersion> <LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors> <Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors>
@@ -20,7 +20,7 @@
<Description>Google's TensorFlow full binding in .NET Standard. <Description>Google's TensorFlow full binding in .NET Standard.
Building, training and infering deep learning models. Building, training and infering deep learning models.
https://tensorflownet.readthedocs.io</Description> https://tensorflownet.readthedocs.io</Description>
<AssemblyVersion>0.110.0.0</AssemblyVersion>
<AssemblyVersion>0.110.1.0</AssemblyVersion>
<PackageReleaseNotes> <PackageReleaseNotes>
tf.net 0.110.x and above are based on tensorflow native 2.11.0 tf.net 0.110.x and above are based on tensorflow native 2.11.0
* RNN, LSTM works. * RNN, LSTM works.
@@ -42,7 +42,7 @@ https://tensorflownet.readthedocs.io</Description>
tf.net 0.10x.x aligns with TensorFlow v2.10.x native library. tf.net 0.10x.x aligns with TensorFlow v2.10.x native library.
tf.net 0.11x.x aligns with TensorFlow v2.11.x native library. tf.net 0.11x.x aligns with TensorFlow v2.11.x native library.
</PackageReleaseNotes> </PackageReleaseNotes>
<FileVersion>0.110.0.0</FileVersion>
<FileVersion>0.110.1.0</FileVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageOutputPath>packages</PackageOutputPath> <PackageOutputPath>packages</PackageOutputPath>


+ 7
- 1
src/TensorFlowNET.Core/ops.cs View File

@@ -138,9 +138,15 @@ namespace Tensorflow
else else
{ {
var graph = get_default_graph(); var graph = get_default_graph();
if (graph is FuncGraph funcGraph)
{
return funcGraph.capture(eager_tensor, name: name);
}
if (!graph.building_function) if (!graph.building_function)
{
throw new RuntimeError("Attempting to capture an EagerTensor without building a function."); throw new RuntimeError("Attempting to capture an EagerTensor without building a function.");
return (graph as FuncGraph).capture(eager_tensor, name: name);
// return eager_tensor.AsPlaceholder(name: name);
}
} }
} }




+ 3
- 3
src/TensorFlowNET.Keras/Tensorflow.Keras.csproj View File

@@ -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.11.0</Version>
<Version>0.11.1</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 2023</Copyright> <Copyright>Apache 2.0, Haiping Chen 2023</Copyright>
@@ -38,8 +38,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.11.0.0</AssemblyVersion>
<FileVersion>0.11.0.0</FileVersion>
<AssemblyVersion>0.11.1.0</AssemblyVersion>
<FileVersion>0.11.1.0</FileVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
<Configurations>Debug;Release;GPU</Configurations> <Configurations>Debug;Release;GPU</Configurations>
</PropertyGroup> </PropertyGroup>


Loading…
Cancel
Save