- Deep network usually require a lot of training data, which usually don’t fit in RAM (or in the GPU if training on GPU). The function “trainNetwork” was designed with that into account using algorithms like stochastic gradient descend, and ADAM optimization algorithm, that work on mini-batches, while keeping the rest of the training data out of memory.
- The function “trainNetwork” (and all the associated functions) is more tightly integrated with cuDNN (NVIDIA’s low-level library to do NN on their GPUs) (e.g., to support fast operations like convolutions).
- The ecosystem around “trainNetwork” closely follows new trends in deep learning, while the one for “train” focuses on the classic algorithms used for training neural networks.
How are the functions "train" and "trainNetwork" different underneath?
25 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 27 Fév 2018
Réponse apportée : MathWorks Support Team
le 27 Fév 2018
How are the functions "train" and "trainNetwork" different underneath? When should I use "train" instead of "trainNetwork" or vice-versa?
Réponse acceptée
MathWorks Support Team
le 26 Juil 2018
"train" and "trainNetwork" and their associated functions correspond to two totally independent universes of network learning. "train" and associated functions are used to create and train a "Shallow Neural Network" which is useful for function approximation and clustering. On the other hand, "trainNetwork" and its associated functions are used to create and train a "Deep Neural Network"* which *is predominantly used for image classification.
The functions “train” and “trainNetwork” sit on top of totally independent code bases. They are part of the same toolbox (Neural Networks Toolbox), but independent of each other.
While you can train deep network or shallow networks with both functions, there are a few reasons that make training deep networks with “trainNetworks” easier:
If you set the same network architecture for both functions, the codebase optimizing the network parameters will be different, and the algorithms doing so will also be different. The function “train” offers more variety of algorithms. The function “trainNetwork” offers algorithms used in recent state of the art research on deep learning.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Parallel and Cloud dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!