I have built a simple neural network,
model = Sequential() model.add(Dense(20, input_dim=5, activation=\'sigmoid\')) model.add(Dense(1, activation=\'sigmoid\
Quite simple, its just the second element in the array returned by get_weights() (For Dense layers):
B_Input_Hidden = model.layers[0].get_weights()[1] B_Output_Hidden = model.layers[1].get_weights()[1]