Difference between trainnet and trainNetwork

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?

 采纳的回答

Ben Hinkle
Ben Hinkle 2023-12-13
编辑:Ben Hinkle 2023-12-13
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 个评论

Good afternoon,
I'm running "Deep Learning Toolbox Version 14.6 (R2023a)", and I don't seem to have the "trainnet" function available.
>> help trainnet
trainnet not found.
trainNetwork is available, but it does not suit my application as I want to have more control over, e.g. loss function.
Can you help?
Sh
trainnet was introduced in R2023b. You must be using at least R2023b to access it.
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.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品

版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by