修正model.save('cifar10_trained_model.h5')

原程式碼:model.save('cifar10_trained_model.h5')

出現錯誤:C:\ProgramData\Anaconda3\lib\site-packages\keras\src\engine\training.py:3000: UserWarning: You are saving your model as an HDF5 file via `model.save()`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')`.

  saving_api.save_model(


修正成這樣就好了:
model.save('cifar10_trained_model.keras')

评论

此博客中的热门博文

修正input_img_data = np.random.random((1, 150, 150, 3)) * 20 + 128.

緣起