def load(self, filepath): # Loads weights from HDF5 file import h5py f = h5py.File(filepath) for k in range(f.attrs['n_layers']): g = f['layer_{}'.format(k)] weights = [g['param_{}'.format(p)] for p in range(g.attrs['n_params'])] self.layers[k].set_weights(weig...