Implementing Neural Network with Callbacks