Browse Source

Add default value of parameter of keras softmax.

pull/997/head
Yaohui Liu 2 years ago
parent
commit
b0d850cdbb
No known key found for this signature in database GPG Key ID: E86D01E1809BD23E
3 changed files with 3 additions and 1 deletions
  1. +1
    -0
      src/TensorFlowNET.Core/Keras/Layers/ILayersApi.Activation.cs
  2. +1
    -0
      src/TensorFlowNET.Keras/Layers/LayersApi.Activation.cs
  3. +1
    -1
      test/TensorFlowNET.Keras.UnitTest/SaveModel/SequentialModelSave.cs

+ 1
- 0
src/TensorFlowNET.Core/Keras/Layers/ILayersApi.Activation.cs View File

@@ -9,6 +9,7 @@ namespace Tensorflow.Keras.Layers
{ {
public ILayer ELU(float alpha = 0.1f); public ILayer ELU(float alpha = 0.1f);
public ILayer SELU(); public ILayer SELU();
public ILayer Softmax(int axis = -1);
public ILayer Softmax(Axis axis); public ILayer Softmax(Axis axis);
public ILayer Softplus(); public ILayer Softplus();
public ILayer HardSigmoid(); public ILayer HardSigmoid();


+ 1
- 0
src/TensorFlowNET.Keras/Layers/LayersApi.Activation.cs View File

@@ -11,6 +11,7 @@ namespace Tensorflow.Keras.Layers {
=> new ELU(new ELUArgs { Alpha = alpha }); => new ELU(new ELUArgs { Alpha = alpha });
public ILayer SELU () public ILayer SELU ()
=> new SELU(new LayerArgs { }); => new SELU(new LayerArgs { });
public ILayer Softmax(int axis = -1) => new Softmax(new SoftmaxArgs { axis = axis });
public ILayer Softmax ( Axis axis ) => new Softmax(new SoftmaxArgs { axis = axis }); public ILayer Softmax ( Axis axis ) => new Softmax(new SoftmaxArgs { axis = axis });
public ILayer Softplus () => new Softplus(new LayerArgs { }); public ILayer Softplus () => new Softplus(new LayerArgs { });
public ILayer HardSigmoid () => new HardSigmoid(new LayerArgs { }); public ILayer HardSigmoid () => new HardSigmoid(new LayerArgs { });


+ 1
- 1
test/TensorFlowNET.Keras.UnitTest/SaveModel/SequentialModelSave.cs View File

@@ -54,7 +54,7 @@ public class SequentialModelSave
keras.layers.Flatten(), keras.layers.Flatten(),
keras.layers.Dense(100, "relu"), keras.layers.Dense(100, "relu"),
keras.layers.Dense(10), keras.layers.Dense(10),
keras.layers.Softmax(1)
keras.layers.Softmax()
}); });


model.summary(); model.summary();


Loading…
Cancel
Save