Then on the final layer, which is the output layer

In [32]:
plt.figure(figsize =(7,7))

# output layer
plt.subplot(111)
plt.title('2D visualization of our neural network output layer')
plt.scatter(result[:, 0], result[:, 1], c= out2.reshape(-1), cmap=cm.coolwarm)
plt.axis("equal")
Out[32]:
(-2.209856630824373,
 2.209856630824373,
 -2.2101177336276674,
 2.2101177336276674)