深度学习学习笔记——C2W3-11——深度学习框架
Introduction to Programming Frameworks编程框架概要
Deep Learning Frameworks深度学习框架
You've learned to implement deep learning algorithms more or less from scratch using Python and NumPY. And I'm glad you did that because I wanted you to understand what these deep learning algorithms are really doing. But you find unless you implement more complex models, such as convolutional neural networks or recurring neural networks, or as you start to implement very large models that is increasingly not practical, at least for most people, is not practical to implement everything yourself from scratch.

Fortunately, there are now many good deep learning software frameworks that can help you implement these models. To make an analogy, I think that hopefully you understand how to do a matrix multiplication and you should be able to implement how to code, to multiply two matrices yourself. But as you build very large applications, you'll probably not want to implement your own matrix multiplication function but instead you want to call a numerical linear algebra library that could do it more efficiently for you. But this still helps that you understand how multiplying two matrices work. So I think deep learning has now matured to that point where it's actually more practical you'll be more efficient doing some things with some of the deep learning frameworks. So let's take a look at the frameworks out there. Today, there are many deep learning frameworks that makes it easy for you to implement neural networks, and here are some of the leading ones. Each of these frameworks has a dedicated user and developer community and I think each of these frameworks is a credible choice for some subset of applications. There are lot of people writing articles comparing these deep learning frameworks and how well these deep learning frameworks changes. And because these frameworks are often evolving and getting better month to month, I'll leave you to do a few internet searches yourself, if you want to see the arguments on the pros and cons of some of these frameworks. But I think many of these frameworks are evolving and getting better very rapidly.
So rather than too strongly endorsing any of these frameworks I want to share with you the criteria I would recommend you use to choose frameworks. One important criteria is the ease of programming, and that means both developing the neural network and iterating on it as well as deploying it for production, for actual use, by thousands or millions or maybe hundreds of millions of users, depending on what you're trying to do. A second important criteria is running speeds, especially training on large data sets, some frameworks will let you run and train your neural network more efficiently than others. And then, one criteria that people don't often talk about but I think is important is whether or not the framework is truly open. And for a framework to be truly open, it needs not only to be open source but I think it needs good governance as well.
Unfortunately, in the software industry some companies have a history of open sourcing software but maintaining single corporation control of the software. And then over some number of years, as people start to use the software, some companies have a history of gradually closing off what was open source, or perhaps moving functionality into their own proprietary cloud services. So one thing I pay a bit of attention to is how much you trust that the framework will remain open source for a long time rather than just being under the control of a single company, which for whatever reason may choose to close it off in the future even if the software is currently released under open source. But at least in the short term depending on your preferences of language, whether you prefer Python or Java or C++ or something else, and depending on what application you're working on, whether this can be division or natural language processing or online advertising or something else, I think multiple of these frameworks could be a good choice.
So that said on programming frameworks by providing a higher level of abstraction than just a numerical linear algebra library, any of these program frameworks can make you more efficient as you develop machine learning applications.
深度学习框架
你已经学会了如何使用Python和NumPy从零实现深度学习算法。而我很高兴你这样做了,因为我希望你能够理解这些深度学习算法实际在做什么。但你会发现,除非你要实现更复杂的模型,如卷积神经网络(CNN)或递归神经网络(RNN),或当你开始实现非常大的模型时,自己从零实现一切对大多数人来说实际上是不切实际的。
幸运的是,现在有很多优秀的深度学习软件框架可以帮助你实现这些模型。举个例子,希望你理解如何进行矩阵乘法,并且应该能够自己实现代码来完成矩阵乘法,但当你构建非常大的应用程序时,你可能不想自己实现矩阵乘法函数,而是希望调用一个可以更高效地为你完成任务的数值线性代数库。但了解矩阵乘法如何工作仍然有帮助。所以我认为深度学习现在已经成熟到这一点,实际上使用一些深度学习框架进行操作更实际,更高效。那么,让我们来看看现有的框架。
今天有许多深度学习框架,使你可以轻松地实现神经网络,以下是一些主要的框架。每个框架都有一个专门的用户和开发者社区,我认为每个框架对于某些特定的应用都是一个有力的选择。许多人在撰写文章比较这些深度学习框架,以及这些框架的变化情况。此外,由于这些框架经常在逐月发展和改进,如果你想了解这些框架的一些优缺点,可以自己做一些互联网搜索。我认为许多框架都在迅速进步并变得更加完善。
因此,与其强烈推荐其中任何一个框架,我希望与你分享一些选择框架的标准。一个重要的标准是编程的难易度,这包括开发神经网络和在它上面进行迭代,以及将其部署到实际的生产环境中供成千上万甚至数百万用户使用的难易度。第二个重要标准是运行速度,特别是在大数据集上进行训练时,一些框架会让你更高效地运行和训练你的神经网络。然后,还有一个人们不常谈论但我认为很重要的标准是框架是否真正开放。要想框架真正开放,不仅需要是开源的,我认为还需要有良好的治理。
不幸的是,在软件行业中,一些公司有开源软件却保持单家公司控制软件的历史。随着人们开始使用该软件,若干年后某些公司逐渐关闭原本开源的软件,或者将功能转移到他们自己的专有云服务中。因此,我会关注一点,即你有多大信心框架将在很长时间内保持开源,而不只是受单一公司的控制,这家公司有可能出于某些原因在未来选择关闭它,即使该软件目前以开源方式发布。但至少在短期内,根据你对语言的偏好,如你是更喜欢Python、Java还是C++,以及你正在从事的应用程序,如计算机视觉、自然语言处理、在线广告等不同应用,我认为多个框架都可能是一个好选择。
总结一下,通过提供比数值线性代数库更高级的抽象层次,任何这些编程框架都可以提高你开发机器学习应用程序的效率。
DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐

所有评论(0)