Keras fit_generator and fit results are different

后端 未结 2 1506
心在旅途
心在旅途 2020-12-18 14:11

I am training a Convolutional Neural Network using face images dataset. The dataset has 10,000 images of dimensions 700 x 700. My model has 12 layers. I am using a generator

2条回答
  •  长情又很酷
    2020-12-18 15:10

    You have to make sure that your data generator shuffles the data between epochs. I would suggest you create a list of possible indices outside of your loop, randomize it with random.shuffle and then iterate over that inside your loop.

    Source: https://github.com/keras-team/keras/issues/2389 and own experience.

提交回复
热议问题