contrastive-predictive-coding icon indicating copy to clipboard operation
contrastive-predictive-coding copied to clipboard

Accuracy report on CPC

Open pribadihcr opened this issue 6 years ago • 4 comments

Hi @davidtellez, In the readme you report the accuracy of CPC is 99%. But I got ~50%. Here my log:

poch 1/10
390/390 [==============================] - 189s 484ms/step - loss: 0.6947 - binary_accuracy: 0.5042 - val_loss: 0.6930 - val_binary_accuracy: 0.5204
Epoch 2/10
390/390 [==============================] - 170s 436ms/step - loss: 0.6945 - binary_accuracy: 0.5002 - val_loss: 0.6941 - val_binary_accuracy: 0.4912
Epoch 3/10
390/390 [==============================] - 171s 438ms/step - loss: 0.6939 - binary_accuracy: 0.4999 - val_loss: 0.6928 - val_binary_accuracy: 0.5144
Epoch 4/10
390/390 [==============================] - 174s 447ms/step - loss: 0.6938 - binary_accuracy: 0.5010 - val_loss: 0.6946 - val_binary_accuracy: 0.4980
Epoch 5/10
390/390 [==============================] - 176s 451ms/step - loss: 0.6942 - binary_accuracy: 0.5050 - val_loss: 0.6932 - val_binary_accuracy: 0.5016
Epoch 6/10
390/390 [==============================] - 177s 455ms/step - loss: 0.6933 - binary_accuracy: 0.4986 - val_loss: 0.6933 - val_binary_accuracy: 0.5016
Epoch 7/10
390/390 [==============================] - 180s 460ms/step - loss: 0.6932 - binary_accuracy: 0.5057 - val_loss: 0.6938 - val_binary_accuracy: 0.4980
Epoch 8/10
390/390 [==============================] - 179s 459ms/step - loss: 0.6931 - binary_accuracy: 0.5083 - val_loss: 0.6933 - val_binary_accuracy: 0.5084
Epoch 9/10
390/390 [==============================] - 175s 448ms/step - loss: 0.6932 - binary_accuracy: 0.4938 - val_loss: 0.6932 - val_binary_accuracy: 0.5068
Epoch 10/10
390/390 [==============================] - 177s 455ms/step - loss: 0.6932 - binary_accuracy: 0.5030 - val_loss: 0.6929 - val_binary_accuracy: 0.5176

pribadihcr avatar Jun 10 '19 02:06 pribadihcr

Hi! That is strange. I have just cloned the repository, run it, and I am able to get 0.99 within 10 epochs:

loss: 0.0434 - binary_accuracy: 0.9854 - val_loss: 0.0205 - val_binary_accuracy: 0.9944

Maybe you were unlucky with the random initialization, try to re-run it a few times. You can play with the hyperparameters as well, it should work eventually!

davidtellez avatar Jun 10 '19 13:06 davidtellez

yeah you are right. I re-run it a few times, and I got ~0.99 accuracy. Thanks

pribadihcr avatar Jun 10 '19 14:06 pribadihcr

yeah you are right. I re-run it a few times, and I got ~0.99 accuracy. Thanks

Hi, I got the same problem! Did you just re-run it few times solved this problem? Have you change any parameters?

Student-HXJ avatar Mar 30 '20 15:03 Student-HXJ

yeah you are right. I re-run it a few times, and I got ~0.99 accuracy. Thanks

Hi,I met the same problem! Did you change anything ?

wyhsirius avatar Apr 11 '20 17:04 wyhsirius