Neural networks can be viewed as a universal approximation function. Let's use a simple dataset called Spiral to see how neural net can obtain a non-linear decision boundary.
Following are the commands used to train and test the model:
$ python spiral.py
Following is the decision boundary obtained. We can observe that the network could fit the non-linear dataset.