Error in loading the model with load_weights in Keras

You are saving the weights, not the whole model. A Model is more than just the weights, including architecture, losses, metrics and etc.

You have two solutions:

1) Go with saving the weights: in this case, in time of model loading, you will need to recreate your model, load the weight and then compile the model. Your code should be something like this:

model = Sequential()
model.add(Dense(60, input_dim=7, kernel_initializer='normal', activation='relu'))
model.add(Dense(55, kernel_initializer='normal', activation='relu'))
model.add(Dense(50, kernel_initializer='normal', activation='relu'))
model.add(Dense(45, kernel_initializer='normal', activation='relu'))
model.add(Dense(30, kernel_initializer='normal', activation='relu'))
model.add(Dense(20, kernel_initializer='normal', activation='relu'))
model.add(Dense(1, kernel_initializer='normal'))
model.load_weights("kwhFinal.h5")
model.compile(loss='mse', optimizer='adam', metrics=[rmse])

2) Save the whole model by this command:

model.save("kwhFinal.h5")

And during the loading use this command for having your model loaded:

from keras.models import load_model
model=load_model("kwhFinal.h5")

Save the model as:

model.save("kwhFinal.h5")

While loading model, you need to add the custom metric function you defined.

model=load_model("kwhFinal.h5",custom_objects={'rmse': rmse})