noise=0.2) model = Sequential() model.add(Dense(units=20, activation=relu, input_dim=2)) model.add(Dense(units=1, activation=sigmoid)) model.compile(loss=losses.binary_crossentropy, optimizer=optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True)) model.fit(X[:500], y[:500], verbose=0, epochs=2000, shuffle=True) plot_decision_boundary(X, y, model, cmap='RdBu') 45