你现在已经学过 You've now learned about
几个非常有效的神经网络 several highly effective neural network
和 ConvNet 构架 and ConvNet architectures.
在接下来的几段视频中我想与你分享 What I want to do in the next few videos
几条如何使用它们的 is share of you some practical advice
实用性建议 on how to use them.
首先从使用 First, starting with using
开放源码的实现开始 open-source implementations.
事实证明很多神经网络 It turns out that a lot of these neural
复杂细致 因而难以复制 networks are difficult or finicky to replicate.
因为一些参数调整的细节问题 Because a lot of details about tuning the hyperparameters
例如学习率衰减等等 such as learning rate decay and other things
会影响性能 that make some difference to the performance.
所以 我发现有些时候 And so, I've found that is sometimes
甚至在顶尖大学 difficult even for say,
学习AI或者 AI or deep learning Ph.D. students
深度学习的博士生 even at the top universities
也很难通过阅读别人研究论文 to replicate someone else's publish work
来复制他人的成果 just from reading the research paper.
幸运的是有很多深度学习的研究者 Fortunately, a lot of deep learning researchers
都习惯把自己的成果作为开发资源 routinely open source their work
放在像 GitHub 之类的网站上 on the internet such as on GitHub.
当你自己编写代码时 And as you do work yourself,
我鼓励你考虑一下 I certainly encourage you to consider
将您的代码 contributing back your code
贡献给开源社区 to the open source community.
如果你看到一篇研究论文 But if you see a research paper whose
想应用它的成果 results you would like to build on top of,
你应该考虑做一件事 one thing you should consider doing,
我经常做的就是 one thing I do quite often is just
在网络上寻找一个开源的实现 look online for an open-source implementation.
因为你如果能得到作者的实现 Because if you can get the author's implementation,
通常要比你从头开始 you can usually get going much faster
实现要快得多 than you try to implement it from scratch.
虽然从零开始实现 Although certain reimplementing from scratch
肯定可以是一个很好的锻炼 could be a good exercise to do as well.
如果你已经熟悉 If you're already familiar with
如何使用 GitHub how to use GitHub,
这段视频对你来说可能 this video might be less necessary
没什么必要或者没那么重要 or less important for you.
但是如果你不习惯 But if you aren't used to downloading
从 GitHub 下载开源代码 open source code from GitHub,
让我来演示一下 let me quickly show you how easy it this.
假设你对残差网络感兴趣 Let's say you're excited about
并且想使用它 residual networks and you want to use it.
那就让我们搜索 GitHub 上的 ResNets So, let's search for resnets on GitHub.
那么你可以在 GitHub 看到 And so, you actually see a lot of
很多不同的 ResNet 的实现 different implementations of resnets on GitHub.
我就打开这里的第一个网址 I'm just going to go to the first URL here.
这是一个 ResNet 实现的 GitHub 资源库 And this is a GitHub repo that implements resnets.
在很多 GitHub 的网页上往下翻 A lot of the GitHub web pages you scroll down
你会看到一些描述 will have some text describing the work
这个实现的文字 of the particular implementation.
这个 GitHub 资源库 This particular GitHub repo, repository,
实际上是由 was actually by the original
ResNet 论文原作者上传的 authors of the resnet paper.
这些代码 这里有麻省理工学院的许可 This code, this license under MIT license,
你可以点击查看 you can click through to take a look
此许可的含义 at the implications of this license.
麻省理工学院许可 The MIT license is one of
是比较开放的开源许可之一 the more permissive open source licenses.
我将下载代码 I'm going to go ahead and download the code,
点击这里的链接 and to do that click on this link.
它会给你一个URL This gives you the URL that
通过这个你可以下载这个代码 you can use to download the code.
我点击这里的按钮 I'm going to click this button over here
将这个 URL 复制到我的剪贴板里 to copy the URL to my clipboard,
接着到这里 and then go over here.
接下来你要做的就是输入git clone And all you have to do is type git clone,
接着粘贴 URL and then control V for the URL
按下回车键 and enter.
几秒之内 In a couple of seconds has downloaded
就将这个资源库的副本 as clone, this repository,
下载到我的本地硬盘里 to my local hard disk.
让我们进入目录 Let's go into the directory.
让我们看一下 Let's take a look.
比起 Windows 我更习惯用 Mac I'm more used to Mac than Windows
不过没关系 让我们试一下 but, I guess, let's see.
让我们进入prototxt Let's go to prototxt.
我认为这就是存放 And I think this is where it has
这些网络文件的地方 the files specifying the network.
让我们看一下这个文件 Let's take a look at this file
因为这个文件很长 because there's is a very long file
包含了 ResNet 里 that specifies in detail configurations
101层的详细配置 of the resnet with 101 layers.
我记得 And it looks like from
从这个网页上看到 what I remember seeing from this web page,
这个特殊实现 this particular implementation
使用了 Caffe 框架 uses the Caffe framework.
但如果你想通过其他编程框架 But you want the implementation of
来实现这一代码 this code using some other programming framework.
你也可以尝试寻找一下 You might be able to find it as well.
如果你在开发 So, if you're developing
一个计算机视觉应用 a computer vision application,
一个常见的工作流程是 a very common workflow would be
先选择一个你喜欢的架构 to pick an architecture that you'd like.
或许是你在这门课中 Maybe one of the ones
学习到过的 you've learned about in this course,
或者是你从 or maybe one that you've heard about
朋友那听说的 from a friend,
或者是从文献中看到的 or from some of the literature.
接着寻找一个开源实现 And look for an open-source implementation
从GitHub下载下来 and download it from GitHub
以此为基础开始构建 to start building from there.
这样做的一个优点在于 One of the advantages of doing so
这些网络通常都需要 also is that sometimes these
很长的时间来训练 networks take a long time to train and
而或许有人已经使用多个GPU someone else might have used multiple GPUs and
通过庞大的数据集 a very largely data set to
预先训练了这些网络 pre-trained some of these networks.
这样一来你就可以 And that allows you to do transfer
使用这些网络进行迁移学习 learning using these networks which we'll
我们将在下一节课讨论这些内容 discuss in the next video as well.
当然 如果你是一名 Of course, if you're
计算机视觉研究员 a computer vision researcher
从零来实现这些 implementing these things from scratch
那么你的工作流程将会不同 then your workflow would be different.
如果你自己构建 那么希望你 And if you do that then do contribute your
将工作成果贡献出来 放到开源社区 work back to the open-source community.
因为已经有如此多计算机视觉研究者 But because so many vision researchers
为了实现这些架构 had done so much work
做了如此之多的工作 implementing these architectures.
我发现从开源项目上开始 I found that often starting with
是一个更好的方法 open-source implementations is a better way
它也确实是一个更快开展 or it's certainly a faster way
新项目的方法 to get started on a new project.