Browse Source

add tf.nn.leaky_relu

tags/v0.12
Oceania2018 6 years ago
parent
commit
202da1f3ba
2 changed files with 14 additions and 0 deletions
  1. +3
    -0
      src/TensorFlowNET.Core/APIs/tf.nn.cs
  2. +11
    -0
      src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs

+ 3
- 0
src/TensorFlowNET.Core/APIs/tf.nn.cs View File

@@ -163,6 +163,9 @@ namespace Tensorflow
=> gen_nn_ops.local_response_normalization(input, depth_radius: depth_radius, bias: bias,
alpha: alpha, beta: beta, name: name);

public Tensor leaky_relu(Tensor features, float alpha = 0.2f, string name = null)
=> nn_ops.leaky_relu(features, alpha: alpha, name: name);

public rnn_cell_impl rnn_cell => new rnn_cell_impl();

public Tensor softmax(Tensor logits, int axis = -1, string name = null)


+ 11
- 0
src/TensorFlowNET.Core/Operations/NnOps/gen_nn_ops.cs View File

@@ -214,6 +214,17 @@ namespace Tensorflow.Operations
});

return _op.outputs[0];
}
public static Tensor leaky_relu(Tensor features, float alpha = 0.2f, string name = null)
{
var _op = _op_def_lib._apply_op_helper("LeakyRelu", name: name, args: new
{
features,
alpha
});

return _op.output;
}

public static Tensor max_pool(Tensor input,


Loading…
Cancel
Save