Skip to content

Commit 7465337

Browse files
AsakusaRinneOceania2018
authored andcommitted
Add default value of parameter of keras softmax.
1 parent 6b64d4b commit 7465337

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/TensorFlowNET.Core/Keras/Layers/ILayersApi.Activation.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public partial interface ILayersApi
99
{
1010
public ILayer ELU(float alpha = 0.1f);
1111
public ILayer SELU();
12+
public ILayer Softmax(int axis = -1);
1213
public ILayer Softmax(Axis axis);
1314
public ILayer Softplus();
1415
public ILayer HardSigmoid();

src/TensorFlowNET.Keras/Layers/LayersApi.Activation.cs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public ILayer ELU ( float alpha = 0.1f )
1111
=> new ELU(new ELUArgs { Alpha = alpha });
1212
public ILayer SELU ()
1313
=> new SELU(new LayerArgs { });
14+
public ILayer Softmax(int axis = -1) => new Softmax(new SoftmaxArgs { axis = axis });
1415
public ILayer Softmax ( Axis axis ) => new Softmax(new SoftmaxArgs { axis = axis });
1516
public ILayer Softplus () => new Softplus(new LayerArgs { });
1617
public ILayer HardSigmoid () => new HardSigmoid(new LayerArgs { });

test/TensorFlowNET.Keras.UnitTest/SaveModel/SequentialModelSave.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void SimpleModelFromSequential()
5454
keras.layers.Flatten(),
5555
keras.layers.Dense(100, "relu"),
5656
keras.layers.Dense(10),
57-
keras.layers.Softmax(1)
57+
keras.layers.Softmax()
5858
});
5959

6060
model.summary();

0 commit comments

Comments
 (0)