Browse Source

nn_ops: added softmax(Tensor logits, int axis = -1, string name = null)

tags/v0.12
Eli Belash 6 years ago
parent
commit
9a1319766c
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/TensorFlowNET.Core/Operations/nn_ops.cs

+ 6
- 0
src/TensorFlowNET.Core/Operations/nn_ops.cs View File

@@ -116,6 +116,12 @@ namespace Tensorflow
return _softmax(logits, gen_nn_ops.log_softmax, axis, name);
}

/// <param name="axis">equivalent to `dim`</param>
public static Tensor softmax(Tensor logits, int axis = -1, string name = null)
{
return _softmax(logits, gen_nn_ops.softmax, axis, name);
}

public static Tensor leaky_relu(Tensor features, float alpha = 0.2f, string name = null)
{
return tf_with(ops.name_scope(name, "LeakyRelu", new { features, alpha }), scope =>


Loading…
Cancel
Save