Skip to content

Commit 42e8b04

Browse files
committed
Release v0.110.1.
1 parent eac68ff commit 42e8b04

File tree

6 files changed

+18
-32
lines changed

6 files changed

+18
-32
lines changed

src/TensorFlowNET.Core/APIs/tf.array.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public Tensor concat(IEnumerable<Tensor> values, int axis, string name = "concat
9191
return identity(values.First(), name: scope);
9292
});
9393
}
94-
95-
return gen_array_ops.concat_v2(values.ToArray(), ops.convert_to_tensor(axis), name: name);
94+
return array_ops.concat(values.ToArray(), axis, name: name);
9695
}
9796

9897
/// <summary>

src/TensorFlowNET.Core/Operations/array_ops.cs

+1-15
Original file line numberDiff line numberDiff line change
@@ -892,23 +892,9 @@ public static Tensor broadcast_static_shape(Tensor shape_x, Tensor shape_y)
892892
/// <param name="axis"></param>
893893
/// <param name="name"></param>
894894
/// <returns></returns>
895-
public static Tensor concat(Tensor[] values, int axis, string name = "concat")
896-
{
897-
if (values.Length == 1) // Degenerate case of one tensor.
898-
{
899-
return tf_with(ops.name_scope(name), scope =>
900-
{
901-
var t = ops.convert_to_tensor(axis, name: "concat_dim", dtype: TF_DataType.TF_INT32);
902-
return identity(values[0], name: scope);
903-
});
904-
}
905-
906-
return gen_array_ops.concat_v2(values, ops.convert_to_tensor(axis), name: name);
907-
}
908-
909895
public static Tensor concat(Tensor[] values, Tensor axis, string name = "concat")
910896
{
911-
return gen_array_ops.concat_v2(values, axis, name: name);
897+
return tf.Context.ExecuteOp("ConcatV2", name, new ExecuteOpArgs(values, axis));
912898
}
913899

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

src/TensorFlowNET.Core/Operations/math_ops.cs

+3-8
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,7 @@ public static Tensor matmul(Tensor a, Tensor b,
791791
bool adjoint_a = false, bool adjoint_b = false,
792792
bool a_is_sparse = false, bool b_is_sparse = false,
793793
string name = null)
794-
{
795-
Tensor result = null;
796-
797-
tf_with(ops.name_scope(name, "MatMul", new Tensor[] { a, b }), scope =>
794+
=> tf_with(ops.name_scope(name, "MatMul", (a, b)), scope =>
798795
{
799796
name = scope;
800797

@@ -815,12 +812,10 @@ public static Tensor matmul(Tensor a, Tensor b,
815812
transpose_b = true;
816813
}
817814

818-
result = gen_math_ops.mat_mul(a, b, transpose_a, transpose_b, name);
815+
return tf.Context.ExecuteOp("MatMul", name, new ExecuteOpArgs(a, b)
816+
.SetAttributes(new { transpose_a, transpose_b }));
819817
});
820818

821-
return result;
822-
}
823-
824819
public static Tensor batch_matmul(Tensor x, Tensor y,
825820
bool adj_x = false, bool adj_y = false,
826821
string name = null)

src/TensorFlowNET.Core/Tensorflow.Binding.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>Tensorflow.Binding</AssemblyName>
66
<RootNamespace>Tensorflow</RootNamespace>
77
<TargetTensorFlow>2.10.0</TargetTensorFlow>
8-
<Version>0.110.0</Version>
8+
<Version>0.110.1</Version>
99
<LangVersion>10.0</LangVersion>
1010
<Nullable>enable</Nullable>
1111
<Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors>
@@ -20,7 +20,7 @@
2020
<Description>Google's TensorFlow full binding in .NET Standard.
2121
Building, training and infering deep learning models.
2222
https://tensorflownet.readthedocs.io</Description>
23-
<AssemblyVersion>0.110.0.0</AssemblyVersion>
23+
<AssemblyVersion>0.110.1.0</AssemblyVersion>
2424
<PackageReleaseNotes>
2525
tf.net 0.110.x and above are based on tensorflow native 2.11.0
2626
* RNN, LSTM works.
@@ -42,7 +42,7 @@ https://tensorflownet.readthedocs.io</Description>
4242
tf.net 0.10x.x aligns with TensorFlow v2.10.x native library.
4343
tf.net 0.11x.x aligns with TensorFlow v2.11.x native library.
4444
</PackageReleaseNotes>
45-
<FileVersion>0.110.0.0</FileVersion>
45+
<FileVersion>0.110.1.0</FileVersion>
4646
<PackageLicenseFile>LICENSE</PackageLicenseFile>
4747
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
4848
<PackageOutputPath>packages</PackageOutputPath>

src/TensorFlowNET.Core/ops.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@ public static Tensor convert_to_tensor(object value,
138138
else
139139
{
140140
var graph = get_default_graph();
141+
if (graph is FuncGraph funcGraph)
142+
{
143+
return funcGraph.capture(eager_tensor, name: name);
144+
}
141145
if (!graph.building_function)
146+
{
142147
throw new RuntimeError("Attempting to capture an EagerTensor without building a function.");
143-
return (graph as FuncGraph).capture(eager_tensor, name: name);
148+
// return eager_tensor.AsPlaceholder(name: name);
149+
}
144150
}
145151
}
146152

src/TensorFlowNET.Keras/Tensorflow.Keras.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Nullable>enable</Nullable>
88
<RootNamespace>Tensorflow.Keras</RootNamespace>
99
<Platforms>AnyCPU;x64</Platforms>
10-
<Version>0.11.0</Version>
10+
<Version>0.11.1</Version>
1111
<Authors>Haiping Chen</Authors>
1212
<Product>Keras for .NET</Product>
1313
<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
3838
<RepositoryType>Git</RepositoryType>
3939
<SignAssembly>true</SignAssembly>
4040
<AssemblyOriginatorKeyFile>Open.snk</AssemblyOriginatorKeyFile>
41-
<AssemblyVersion>0.11.0.0</AssemblyVersion>
42-
<FileVersion>0.11.0.0</FileVersion>
41+
<AssemblyVersion>0.11.1.0</AssemblyVersion>
42+
<FileVersion>0.11.1.0</FileVersion>
4343
<PackageLicenseFile>LICENSE</PackageLicenseFile>
4444
<Configurations>Debug;Release;GPU</Configurations>
4545
</PropertyGroup>

0 commit comments

Comments
 (0)