Open digital-thinking opened 1 year ago
System information
MCC does not work on binary labels with a single neuron as output, it always returns 0: Last layer:
x = tf.keras.layers.Dense(1, activation='sigmoid')(x) model.compile('sgd', 'binary_crossentropy', metrics=['accuracy', tfa.metrics.MatthewsCorrelationCoefficient(num_classes=2)])
Output always 0: 38s 19s/step - loss: 0.6899 - accuracy: 0.4843 - MatthewsCorrelationCoefficient: 0.0000e+00 - val_loss: 0.6934 - val_accuracy: 0.4096 - val_MatthewsCorrelationCoefficient: 0.0000e+00
The last comment from the user here also describes the problem, however the solution does not work anymore https://github.com/tensorflow/addons/issues/2339
System information
MCC does not work on binary labels with a single neuron as output, it always returns 0: Last layer:
Output always 0: 38s 19s/step - loss: 0.6899 - accuracy: 0.4843 - MatthewsCorrelationCoefficient: 0.0000e+00 - val_loss: 0.6934 - val_accuracy: 0.4096 - val_MatthewsCorrelationCoefficient: 0.0000e+00
The last comment from the user here also describes the problem, however the solution does not work anymore https://github.com/tensorflow/addons/issues/2339