Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

调节

以编程方式调整训练选项,从检查点继续训练,并研究对抗样本

要了解如何使用 trainingOptions 函数设置选项,请参阅设置参数并训练卷积神经网络。在确定一些合适的开始选项后,您可以使用试验管理器自动扫描超参数或尝试贝叶斯优化。

通过生成对抗样本来研究网络稳健性。然后,您可以使用快速梯度符号方法 (FGSM) 对抗训练来训练在对抗扰动下保持稳健的网络。

App

深度网络设计器设计、可视化和训练深度学习网络

对象

trainingProgressMonitorMonitor and plot training progress for deep learning custom training loops (自 R2022b 起)

函数

trainingOptionsOptions for training deep learning neural network
trainNetwork训练神经网络
trainnetTrain deep learning neural network (自 R2023b 起)

主题

  • 设置参数并训练卷积神经网络

    了解如何为卷积神经网络设置训练参数。

  • 使用贝叶斯优化进行深度学习

    此示例说明如何将贝叶斯优化应用于深度学习并找到卷积神经网络的最优网络超参数和训练选项。

  • Detect Issues During Deep Neural Network Training

    This example shows how to automatically detect issues while training a deep neural network.

  • 并行训练深度学习网络

    此示例说明如何在本地计算机上运行多个深度学习试验。使用此示例作为模板,您可以修改网络层和训练选项,以满足您的具体应用需要。无论您有一个还是多个 GPU,都可以使用这种方法。如果您只有一个 GPU,网络会在后台逐个进行训练。本示例中的方法使您能够在进行深度学习试验时继续使用 MATLAB®。

  • Train Network Using Custom Training Loop

    This example shows how to train a network that classifies handwritten digits with a custom learning rate schedule.

  • Compare Activation Layers

    This example shows how to compare the accuracy of training networks with ReLU, leaky ReLU, ELU, and swish activation layers.


  • Deep Learning Tips and Tricks

    Learn how to improve the accuracy of deep learning networks.

  • 指定自定义权重初始化函数

    此示例说明如何为后跟泄漏 ReLU 层的卷积层创建自定义 He 权重初始化函数。

  • 比较层权重初始化函数

    此示例说明如何使用不同权重初始化函数来训练深度学习网络。

  • 自定义深度学习网络训练期间的输出

    此示例说明如何定义在深度学习神经网络训练期间的每次迭代都运行的输出函数。如果您使用 trainingOptions'OutputFcn' 名称-值对组参数指定输出函数,则 trainNetwork 将分别在训练开始前、每次训练迭代后以及训练结束后各调用这些函数一次。每次调用输出函数时,trainNetwork 都会传递一个包含当前迭代序号、损失和准确度等信息的结构体。您可以使用输出函数显示或绘制进度信息,或者停止训练。要提前停止训练,请让输出函数返回 true。如果任何输出函数返回 true,则训练结束,并且 trainNetwork 返回最新网络。

  • Create Custom Deep Learning Training Plot

    This example shows how to create a custom training plot that updates at each iteration during training of deep learning neural networks using trainnet. (自 R2023b 起)

  • Custom Stopping Criteria for Deep Learning Training

    This example shows how to stop training of deep learning neural networks based on custom stopping criteria using trainnet. (自 R2023b 起)

相关信息