Open NickRusso-os opened 4 years ago
same issue, no clue how to solve it. i printed the format string, and it just says"../models/weights-improvement-{epoch:02d}-{val_acc:.2f}.hdf5" so it doesn't format the string properly
I am using something like this
metric = 'acc' target_dir = "../models/weights-improvement/" if not os.path.exists(target_dir): os.mkdir(target_dir) model.save('../models/model') model.save_weights('../models/weights')
checkpoint = ModelCheckpoint(filepath=target_dir + 'weights-improvement-{epoch:02d}-{acc:.2f}.hdf5', monitor=metric, verbose=2, save_best_only=True, mode='max')
and it works fine in Windows 10.
I am using something like this
metric = 'acc' target_dir = "../models/weights-improvement/" if not os.path.exists(target_dir): os.mkdir(target_dir) model.save('../models/model') model.save_weights('../models/weights')
checkpoint = ModelCheckpoint(filepath=target_dir + 'weights-improvement-{epoch:02d}-{acc:.2f}.hdf5', monitor=metric, verbose=2, save_best_only=True, mode='max')
and it works fine in Windows 10.
Unless you already have "models" directory, best to use os.makedirs(target_dir)
This is a problem because of the python enviroment you are using. Change the target directory to the exact location instead of a relative path as in the example. For example: "YOUR_PATH_TO_MODELS_FOLDER/models/weights-improvement-{epoch:02d}-{val_acc:2f}.hdf5"
Just go the the folder and check for properties by right clicking and copy the path you see over there to this line.
Originally posted by @cderinbogaz in https://github.com/cderinbogaz/inpredo/issues/11#issuecomment-705474797
Hello, I added my directory as you specified and still receive the same error