diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index 894f9780..564abbd0 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -480,26 +480,27 @@ namespace Tensorflow return _op.outputs[0]; } - /// - /// Subroutine for Min or Max functions. See _min and _max - /// - private static Tensor MinOrMax(Tx input, Ty axis, string methodName, bool keep_dims = false, string name = null) - => tf.Context.ExecuteOp(methodName, name, new ExecuteOpArgs(input, axis) + public static Tensor _max(Tx input, Ty axis, bool keep_dims = false, string name = null) + => tf.Context.ExecuteOp("Max", name, new ExecuteOpArgs(input, axis) { GetGradientAttrs = (op) => new { T = op.get_attr("T"), - align_corners = op.get_attr("align_corners"), - half_pixel_centers = op.get_attr("half_pixel_centers") + keep_dims = op.get_attr("keep_dims"), + Tidx = op.get_attr("Tidx") } }.SetAttributes(new { keep_dims, reduction_indices = axis })); - public static Tensor _max(Tx input, Ty axis, bool keep_dims = false, string name = null) - => MinOrMax(input, axis, "Max", keep_dims: keep_dims, name: name); - public static Tensor _min(Tx input, Ty axis, bool keep_dims = false, string name = null) - => MinOrMax(input, axis, "Min", keep_dims: keep_dims, name: name); - + => tf.Context.ExecuteOp("Min", name, new ExecuteOpArgs(input, axis) + { + GetGradientAttrs = (op) => new + { + T = op.get_attr("T"), + keep_dims = op.get_attr("keep_dims"), + Tidx = op.get_attr("Tidx") + } + }.SetAttributes(new { keep_dims, reduction_indices = axis })); public static Tensor pow(Tx x, Ty y, string name = null) => tf.Context.ExecuteOp("Pow", name, new ExecuteOpArgs(x, y)); diff --git a/src/TensorFlowNET.Core/Tensorflow.Binding.csproj b/src/TensorFlowNET.Core/Tensorflow.Binding.csproj index ede72a6a..c2b53e76 100644 --- a/src/TensorFlowNET.Core/Tensorflow.Binding.csproj +++ b/src/TensorFlowNET.Core/Tensorflow.Binding.csproj @@ -5,7 +5,7 @@ Tensorflow.Binding Tensorflow 2.10.0 - 0.100.2 + 0.100.3 10.0 enable Haiping Chen, Meinrad Recheis, Eli Belash @@ -20,7 +20,7 @@ Google's TensorFlow full binding in .NET Standard. Building, training and infering deep learning models. https://tensorflownet.readthedocs.io - 0.100.2.0 + 0.100.3.0 tf.net 0.100.x and above are based on tensorflow native 2.10.0 @@ -38,7 +38,7 @@ https://tensorflownet.readthedocs.io tf.net 0.7x.x aligns with TensorFlow v2.7.x native library. tf.net 0.10x.x aligns with TensorFlow v2.10.x native library. - 0.100.2.0 + 0.100.3.0 LICENSE true true diff --git a/src/TensorFlowNET.Keras/Tensorflow.Keras.csproj b/src/TensorFlowNET.Keras/Tensorflow.Keras.csproj index f7d18635..264b9501 100644 --- a/src/TensorFlowNET.Keras/Tensorflow.Keras.csproj +++ b/src/TensorFlowNET.Keras/Tensorflow.Keras.csproj @@ -7,10 +7,10 @@ enable Tensorflow.Keras AnyCPU;x64 - 0.10.2 + 0.10.3 Haiping Chen Keras for .NET - Apache 2.0, Haiping Chen 2021 + Apache 2.0, Haiping Chen 2023 TensorFlow.Keras https://github.com/SciSharp/TensorFlow.NET https://avatars3.githubusercontent.com/u/44989469?s=200&v=4 @@ -37,8 +37,8 @@ Keras is an API designed for human beings, not machines. Keras follows best prac Git true Open.snk - 0.10.2.0 - 0.10.2.0 + 0.10.3.0 + 0.10.3.0 LICENSE Debug;Release;GPU