Neural networks take complex data patterns and they move it around until they are more linear or linear separable. Here, examine how the data is morphed by training the network and picking the size.
Pick how long you train for. Notice how the longer you train, the more separate the points become in the transformed space; which is updated every epoch. Also notice how the larger you make the network the fewer epochs you need to train for.
The inputs are mapped from 3-D space to Hidden Layer size space. Then they are mapped back down to 3-D space. This is the transformed space.
Epoch 0
Observe how after training, you can simply slide a plane to separate the yellow and purple points. For more information about neural networks from a topological perspective, check out this article
by the co-founder of Anthropic.