如何设置自己的深度学习实验
从series:深神经网络
The Experiment Manager app allows you to set up experiments for training, fine-tuning, and explaining your deep learning networks under a variety of initial conditions. See how you can set up your deep learning experiments with a detailed walk-through of the following steps:
- Reviewing an existing training script that could be turned into an experiment
- Turning a script into a function that the Experiment Manager will accept
- Highlighting the parameters you’d like to perform trials over
- Adding the experiment setup function into the Experiment Manager
你好。我叫乔·希克林。我是Mathworks的高级开发人员。在我的上一个视频中,我向您展示了实验经理如何可以自动化您为深度学习系统进行的许多实验。在此视频中,我将向您展示我要做的才能让实验经理运行实验。
To configure the experiment manager to run your experiments, you follow a four-step process. First, you need to make the script that runs some kind of deep learning experiment. You've probably already got something like this.
The next step is to turn it into a function. Here I've added a function statement at the beginning and an end statement at the end. This function has to return three things. It has to return the data store with your data, the layers of the network, and the training options. And it's got to take one argument called params, and I'll talk about that more in a minute. Also, remove your call to trainnetwork because the experiment manager will do that for you.
The third step is the most work. You have to make your function perform different trials based on the value of the param argument. In this case, I'm going to use a larger or smaller data set, and I'm going to augment the data or not, depending on the value of this parameter. And here's how I've done that. I have a switch statement that is looking at the data set field of the parameter and based and switching off that. And depending which one of these strings it is, I'm using larger or smaller data set, and I'm doing augmentation or not. We're counting on the experiment manager to call this function now with different values for param.dataset, and for each one of those values I will do a different thing.
最后一步是告诉实验经理您的功能。如果我去实验经理说新实验,他想知道我的功能的名称 - 这就是我刚刚写的 - 我的参数名称 - 让我们看看。那是数据集 - 以及该参数的可能值。我碰巧将它们存储在这里。
就是这样。因此,现在当我运行此实验时,实验管理器将调用我的函数,并且为了获得数据集参数的值,我们将一次通过每个字符串中的每个字符串。结果是这个数据集,我之前做到了这一点。其他两个实验以完全相同的方式设置。在第二个实验中,我改变了网络体系结构,因此在我的功能中,我添加了一个开关语句,该语句根据其值打开另一个参数,并根据其值创建了四种不同类型的网络之一。
To tell Experiment Manager about that, we went to the Network Definition, told it, that's the name of my function, that's the name of my parameter, and there are the possible values. And that's all that took.
最后一个实验 - 我将培训选项变化了一点,而这有所不同。我只是直接将参数值直接传递到trainingoptions命令。我有一个求解器,时代,小型匹配和学习量,就像我说的那样,我只是直接传递了这些方法。为了告诉实验经理,我做了同样的事情。有我的功能的名称。我使用的每个参数的名称,并且有值。
And that's all it took to set it up to run those 54 trials for me. I hope I've shown you that Experiment Manager can be an excellent way to automate, document, and store your deep learning experiments. If you want to learn more about it, follow the links at the bottom of the page.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
如何获得最佳网站性能
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
欧洲
Asia Pacific
- Australia(English)
- India(English)
- 新西兰(English)
- 中国
- 日本Japanese(日本語)
- 한국Korean(한국어)