diff --git a/src/TensorFlowNET.Core/APIs/tf.nn.cs b/src/TensorFlowNET.Core/APIs/tf.nn.cs index e5ecb908..7b9d0a2c 100644 --- a/src/TensorFlowNET.Core/APIs/tf.nn.cs +++ b/src/TensorFlowNET.Core/APIs/tf.nn.cs @@ -148,6 +148,21 @@ namespace Tensorflow }); } + /// + /// Local Response Normalization. + /// + /// + /// + /// + /// + /// + /// + /// + public Tensor lrn(Tensor input, int depth_radius = 5, int bias = 1, + int alpha = 1, float beta = 0.5f, string name = null) + => gen_nn_ops.local_response_normalization(input, depth_radius: depth_radius, bias: bias, + alpha: alpha, beta: beta, name: name); + public rnn_cell_impl rnn_cell => new rnn_cell_impl(); public Tensor softmax(Tensor logits, int axis = -1, string name = null) diff --git a/src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs b/src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs index 6c31eb62..f1e40151 100644 --- a/src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs +++ b/src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs @@ -181,6 +181,31 @@ namespace Tensorflow.Operations return _op.outputs; } + /// + /// Local Response Normalization. + /// + /// + /// + /// + /// + /// + /// + /// + public static Tensor local_response_normalization(Tensor input, int depth_radius = 5, int bias = 1, + int alpha = 1, float beta = 0.5f, string name = null) + { + var _op = _op_def_lib._apply_op_helper("LRN", name: name, args: new + { + input, + depth_radius, + bias, + alpha, + beta + }); + + return _op.output; + } + public static Tensor log_softmax(Tensor logits, string name = null) { var _op = _op_def_lib._apply_op_helper("LogSoftmax", name: name, args: new