Skip to content

Commit

Permalink
Release v0.110.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Jul 8, 2023
1 parent eac68ff commit 42e8b04
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 32 deletions.
3 changes: 1 addition & 2 deletions src/TensorFlowNET.Core/APIs/tf.array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ public Tensor concat(IEnumerable<Tensor> values, int axis, string name = "concat
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>
Expand Down
16 changes: 1 addition & 15 deletions src/TensorFlowNET.Core/Operations/array_ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -892,23 +892,9 @@ public static Tensor broadcast_static_shape(Tensor shape_x, Tensor shape_y)
/// <param name="axis"></param>
/// <param name="name"></param>
/// <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")
{
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")
Expand Down
11 changes: 3 additions & 8 deletions src/TensorFlowNET.Core/Operations/math_ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,7 @@ public static Tensor matmul(Tensor a, Tensor b,
bool adjoint_a = false, bool adjoint_b = false,
bool a_is_sparse = false, bool b_is_sparse = false,
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;
Expand All @@ -815,12 +812,10 @@ public static Tensor matmul(Tensor a, Tensor b,
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,
bool adj_x = false, bool adj_y = false,
string name = null)
Expand Down
6 changes: 3 additions & 3 deletions src/TensorFlowNET.Core/Tensorflow.Binding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>Tensorflow.Binding</AssemblyName>
<RootNamespace>Tensorflow</RootNamespace>
<TargetTensorFlow>2.10.0</TargetTensorFlow>
<Version>0.110.0</Version>
<Version>0.110.1</Version>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors>
Expand All @@ -20,7 +20,7 @@
<Description>Google's TensorFlow full binding in .NET Standard.
Building, training and infering deep learning models.
https://tensorflownet.readthedocs.io</Description>
<AssemblyVersion>0.110.0.0</AssemblyVersion>
<AssemblyVersion>0.110.1.0</AssemblyVersion>
<PackageReleaseNotes>
tf.net 0.110.x and above are based on tensorflow native 2.11.0
* RNN, LSTM works.
Expand All @@ -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.11x.x aligns with TensorFlow v2.11.x native library.
</PackageReleaseNotes>
<FileVersion>0.110.0.0</FileVersion>
<FileVersion>0.110.1.0</FileVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageOutputPath>packages</PackageOutputPath>
Expand Down
8 changes: 7 additions & 1 deletion src/TensorFlowNET.Core/ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,15 @@ public static Tensor convert_to_tensor(object value,
else
{
var graph = get_default_graph();
if (graph is FuncGraph funcGraph)
{
return funcGraph.capture(eager_tensor, name: name);
}
if (!graph.building_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);
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/TensorFlowNET.Keras/Tensorflow.Keras.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<RootNamespace>Tensorflow.Keras</RootNamespace>
<Platforms>AnyCPU;x64</Platforms>
<Version>0.11.0</Version>
<Version>0.11.1</Version>
<Authors>Haiping Chen</Authors>
<Product>Keras for .NET</Product>
<Copyright>Apache 2.0, Haiping Chen 2023</Copyright>
Expand Down Expand Up @@ -38,8 +38,8 @@ Keras is an API designed for human beings, not machines. Keras follows best prac
<RepositoryType>Git</RepositoryType>
<SignAssembly>true</SignAssembly>
<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>
<Configurations>Debug;Release;GPU</Configurations>
</PropertyGroup>
Expand Down

0 comments on commit 42e8b04

Please sign in to comment.