Solved by ptrblck in post #2 
              
              
                Without activation functions your stacked linear layers can be seen as a single linear mapping and your model might thus fail easily. 
This chapter in the DeepLearningBook explains more about activation functions and uses the XOR example.