https://technicalsource9.medium.com/how-are-the-functions-train-and-trainnetwork-different-underneath-b7b7857d8f65