Add multiway neural network
Make get_cost_updates and get_error functions independent