Unable to get results for consecutive folds

Elke asked 3 weeks ago

Hi Chris, I have run the exact code in the example provided for K fold cross-validation for the CIFAR 10 dataset however I cannot seem to get the results that you have shown in the blog. I am only able to get the values for Fold 1.
 
Results:

Score for fold 1: loss of 0.8563954830169678; accuracy of 71.01666927337646%
------------------------------------------------------------------------
Score per fold
------------------------------------------------------------------------
> Fold 1 - Loss: 0.8563954830169678 - Accuracy: 71.01666927337646%
------------------------------------------------------------------------
Average scores for all folds:
> Accuracy: 71.01666927337646 (+- 0.0)
> Loss: 0.8563954830169678
------------------------------------------------------------------------

1 Answers
Chris Staff answered 2 weeks ago

Hi Elke,

That is really interesting: I just ran the code, and it runs correctly for multiple folds. What did you set num_folds to?


1080/1080 [==============================] - 8s 6ms/step - loss: 1.8167 - accuracy: 0.3565
Score for fold 1: loss of 1.1902490854263306; accuracy of 57.28333592414856%
------------------------------------------------------------------------
Training for fold 2 ...
1080/1080 [==============================] - 14s 13ms/step - loss: 1.7988 - accuracy: 0.3582
Score for fold 2: loss of 1.202297568321228; accuracy of 57.216668128967285%
------------------------------------------------------------------------
Training for fold 3 ...

Best,
Chris

Your Answer

16 + 19 =