Network train and testing added (the most basic version implemented)