修正model.save('cats_and_dogs_small_1.h5') # Ver: 001

 原程式碼:model.save('cats_and_dogs_small_1.h5') # Ver: 001

出現錯誤:
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('cats_and_dogs_small_1.keras')  # or any other desired file name with the .keras extension

评论

此博客中的热门博文

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

緣起