Difference between trainnet and trainNetwork

133 visualizaciones (últimos 30 días)
Isaiah
Isaiah el 13 de Dic. de 2023
Comentada: Onur Kilic el 12 de Mzo. de 2024
Hi, I am creating a deep neural network for a regression problem with tabular data as the inputs (6 features and 1 target).
I was wondering if there is any difference between the trainnet and trainNetwork functions? They seem to be quite similar so I am unsure of the pros and cons to using either function?

Respuesta aceptada

Ben Hinkle
Ben Hinkle el 13 de Dic. de 2023
Editada: Ben Hinkle el 13 de Dic. de 2023
Here are some of the differences between the two trainers:
  • trainnet accepts a loss function input, which makes it easier to customize the loss if the standard regression loss is not enough.
  • trainnet lets you track additional metrics while training.
  • trainnet supports the LBFGS solver, which can converge quickly for small problems
  • trainnet outputs a dlnetwork, while trainNetwork outputs a SeriesNetwork or DAGNetwork.
  • trainNetwork accepts a table as input, while trainnet does not. This might make trainNetwork slightly easier to use when training data is in a table.
  3 comentarios
Cris LaPierre
Cris LaPierre el 15 de Dic. de 2023
Editada: Cris LaPierre el 16 de Dic. de 2023
trainnet was introduced in R2023b. You must be using at least R2023b to access it.
Onur Kilic
Onur Kilic el 12 de Mzo. de 2024
Thank you, this is useful information. Should we expect performance improvements for trainnet in the near future? Currently, when training larger models, trainnet is much slower than trainNetwork and also gives 'out of memory' errors (GPU training) for model or minibatch sizes that trainNetwork would handle without issues.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by