Skip to content

Keras softmax does not align with tensorflow (python) #985

Closed
@AsakusaRinne

Description

@AsakusaRinne

The Model is quite simple:

var model = keras.Sequential(new List<Tensorflow.Keras.ILayer>()
{
    keras.layers.InputLayer(128),
    keras.layers.Dense(64),
    keras.layers.Dense(6),
    //keras.layers.Softmax(-1)
});

When using Softmax, it does not converge, while it converge well after removing it.

In tensorflow (python), the it's just the opposite. The model converge with softmax but does not without softmax.

Both in csharp and python I used sparse_categorical_crossentropy loss and Adam optimizer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions