Open keosaly opened 3 months ago
my code:
earlystopper = EarlyStopping(monitor="val_CER", patience=50, verbose=1, mode="min") checkpoint = ModelCheckpoint(f"{configs.model_path}/model.h5", monitor="val_CER", verbose=1, save_best_only=True, mode="min") trainLogger = TrainLogger(configs.model_path) tb_callback = TensorBoard(f"{configs.model_path}/logs", update_freq=1) reduceLROnPlat = ReduceLROnPlateau(monitor="val_CER", factor=0.9, min_delta=1e-10, patience=20, verbose=1, mode="min") model2onnx = Model2onnx(f"{configs.model_path}/model.h5")
model.fit( train_data_provider, validation_data=val_data_provider, epochs=configs.train_epochs, callbacks=[earlystopper, checkpoint, trainLogger, reduceLROnPlat, tb_callback, model2onnx], workers=configs.train_workers )
train_data_provider.to_csv(os.path.join(configs.model_path, "train.csv")) val_data_provider.to_csv(os.path.join(configs.model_path, "val.csv"))
did you find any solutions on that? I'am still working on that
It seems you try to use newest tensorflow version (different from tutorial). Recommend to downgrade tensorflow for compatibility. Otherwise you need to do changes manualy. For example change model.h5 to model.keras in all places. But you may face more serious incompatibilities further
Hello, Can you help me to fix this?
ValueError: The filepath provided must end in
.keras
(Keras model format). Received: filepath=Models/02_captcha_to_text/202403291006/model.h5