In the final assignment of week 3, how did he preprocess the data and convert it into .h5 file?
The convertion of saved model to h5 format is done by calling model.save_weights() and passing in the path and file name to save the weights to with an h5 extension.
Regards
DP
@Deepti_Prasad
base_dir = HOME_DIR + “processed/”
with open(base_dir + “config.json”) as json_file:
config = json.load(json_file)
Get generators for training and validation sets
train_generator = util.VolumeDataGenerator(config[“train”], base_dir + “train/”, batch_size=3, dim=(160, 160, 16), verbose=0)
valid_generator = util.VolumeDataGenerator(config[“valid”], base_dir + “valid/”, batch_size=3, dim=(160, 160, 16), verbose=0)
We need to perform these line of codes first before saving right? so what will be in json file ? I can’t save the weights before fitting the data into the model. If you could provide me the code, it will be of great help.
Thanks,
Ankur