diff --git a/sources/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md b/sources/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md deleted file mode 100644 index 08551028b2..0000000000 --- a/sources/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md +++ /dev/null @@ -1,182 +0,0 @@ -distant1219 is translating -PyTorch 1.0 Preview Release: Facebook’s newest Open Source AI -====== -Facebook already uses its own Open Source AI, PyTorch quite extensively in its own artificial intelligence projects. Recently, they have gone a league ahead by releasing a pre-release preview version 1.0. - -For those who are not familiar, [PyTorch][1] is a Python-based library for Scientific Computing. - -PyTorch harnesses the [superior computational power of Graphical Processing Units (GPUs)][2] for carrying out complex [Tensor][3] computations and implementing [deep neural networks][4]. So, it is used widely across the world by numerous researchers and developers. - -This new ready-to-use [Preview Release][5] was announced at the [PyTorch Developer Conference][6] at [The Midway][7], San Francisco, CA on Tuesday, October 2, 2018. - -### Highlights of PyTorch 1.0 Release Candidate - -![PyTorhc is Python based open source AI framework from Facebook][8] - -Some of the main new features in the release candidate are: - -#### 1\. JIT - -JIT is a set of compiler tools to bring research close to production. It includes a Python-based language called Torch Script and also ways to make existing code compatible with itself. - -#### 2\. New torch.distributed library: “C10D” - -“C10D” enables asynchronous operation on different backends with performance improvements on slower networks and more. - -#### 3\. C++ frontend (experimental) - -Though it has been specifically mentioned as an unstable API (expected in a pre-release), this is a pure C++ interface to the PyTorch backend that follows the API and architecture of the established Python frontend to enable research in high performance, low latency and C++ applications installed directly on hardware. - -To know more, you can take a look at the complete [update notes][9] on GitHub. - -The first stable version PyTorch 1.0 will be released in summer. - -### Installing PyTorch on Linux - -To install PyTorch v1.0rc0, the developers recommend using [conda][10] while there also other ways to do that as shown on their [local installation page][11] where they have documented everything necessary in detail. - -#### Prerequisites - - * Linux - * Pip - * Python - * [CUDA][12] (For Nvidia GPU owners) - - - -As we recently showed you [how to install and use Pip][13], let’s get to know how we can install PyTorch with it. - -Note that PyTorch has GPU and CPU-only variants. You should install the one that suits your hardware. - -#### Installing old and stable version of PyTorch - -If you want the stable release (version 0.4) for your GPU, use: - -``` -pip install torch torchvision - -``` - -Use these two commands in succession for a CPU-only stable release: - -``` -pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl -pip install torchvision - -``` - -#### Installing PyTorch 1.0 Release Candidate - -You install PyTorch 1.0 RC GPU version with this command: - -``` -pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html - -``` - -If you do not have a GPU and would prefer a CPU-only version, use: - -``` -pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html - -``` - -#### Verifying your PyTorch installation - -Startup the python console on a terminal with the following simple command: - -``` -python - -``` - -Now enter the following sample code line by line to verify your installation: - -``` -from __future__ import print_function -import torch -x = torch.rand(5, 3) -print(x) - -``` - -You should get an output like: - -``` -tensor([[0.3380, 0.3845, 0.3217], - [0.8337, 0.9050, 0.2650], - [0.2979, 0.7141, 0.9069], - [0.1449, 0.1132, 0.1375], - [0.4675, 0.3947, 0.1426]]) - -``` - -To check whether you can use PyTorch’s GPU capabilities, use the following sample code: - -``` -import torch -torch.cuda.is_available() - -``` - -The resulting output should be: - -``` -True - -``` - -Support for AMD GPUs for PyTorch is still under development, so complete test coverage is not yet provided as reported [here][14], suggesting this [resource][15] in case you have an AMD GPU. - -Lets now look into some research projects that extensively use PyTorch: - -### Ongoing Research Projects based on PyTorch - - * [Detectron][16]: Facebook AI Research’s software system to intelligently detect and classify objects. It is based on Caffe2. Earlier this year, Caffe2 and PyTorch [joined forces][17] to create a Research + Production enabled PyTorch 1.0 we talk about. - * [Unsupervised Sentiment Discovery][18]: Such methods are extensively used with social media algorithms. - * [vid2vid][19]: Photorealistic video-to-video translation - * [DeepRecommender][20] (We covered how such systems work on our past [Netflix AI article][21]) - - - -Nvidia, leading GPU manufacturer covered more on this with their own [update][22] on this recent development where you can also read about ongoing collaborative research endeavours. - -### How should we react to such PyTorch capabilities? - -To think Facebook applies such amazingly innovative projects and more in its social media algorithms, should we appreciate all this or get alarmed? This is almost [Skynet][23]! This newly improved production-ready pre-release of PyTorch will certainly push things further ahead! Feel free to share your thoughts with us in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/pytorch-open-source-ai-framework/ - -作者:[Avimanyu Bandyopadhyay][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/avimanyu/ -[1]: https://pytorch.org/ -[2]: https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units -[3]: https://en.wikipedia.org/wiki/Tensor -[4]: https://www.techopedia.com/definition/32902/deep-neural-network -[5]: https://code.fb.com/ai-research/facebook-accelerates-ai-development-with-new-partners-and-production-capabilities-for-pytorch-1-0 -[6]: https://pytorch.fbreg.com/ -[7]: https://www.themidwaysf.com/ -[8]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/10/pytorch.jpeg -[9]: https://github.com/pytorch/pytorch/releases/tag/v1.0rc0 -[10]: https://conda.io/ -[11]: https://pytorch.org/get-started/locally/ -[12]: https://www.pugetsystems.com/labs/hpc/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184/ -[13]: https://itsfoss.com/install-pip-ubuntu/ -[14]: https://github.com/pytorch/pytorch/issues/10657#issuecomment-415067478 -[15]: https://rocm.github.io/install.html#installing-from-amd-rocm-repositories -[16]: https://github.com/facebookresearch/Detectron -[17]: https://caffe2.ai/blog/2018/05/02/Caffe2_PyTorch_1_0.html -[18]: https://github.com/NVIDIA/sentiment-discovery -[19]: https://github.com/NVIDIA/vid2vid -[20]: https://github.com/NVIDIA/DeepRecommender/ -[21]: https://itsfoss.com/netflix-open-source-ai/ -[22]: https://news.developer.nvidia.com/pytorch-1-0-accelerated-on-nvidia-gpus/ -[23]: https://en.wikipedia.org/wiki/Skynet_(Terminator) diff --git a/translated/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md b/translated/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md new file mode 100644 index 0000000000..8bc95210a0 --- /dev/null +++ b/translated/tech/20181004 PyTorch 1.0 Preview Release- Facebook-s newest Open Source AI.md @@ -0,0 +1,174 @@ +PyTorch 1.0 预览版发布: Facebook 最新 AI 开源框架 +====== +Facebook 在人工智能项目中广泛使用自己的开源 AI 框架 PyTorch,最近,他们已经发布了 PyTorch 1.0 的预览版本。 + +对于那些不熟悉的人, [PyTorch][1] 是一个基于 Python 的科学计算库。 + +PyTorch 利用 [GPUs 超强的运算能力 ][2] 来实现复杂的 [张量][3] 计算 和 [深度神经网络][4]。 因此, 它被世界各地的研究人员和开发人员广泛使用。 + +这一新的能够使用的 [预览版][5] 已在2018年10月2日周二旧金山举办的 [PyTorch 开发人员大会][6] 的[中途][7]宣布。 + +### PyTorch 1.0 候选版本的亮点 + +![PyTorhc is Python based open source AI framework from Facebook][8] + +候选版本中的一些主要新功能包括: + +#### 1\. JIT + +JIT 是一个编译工具集,使研究和生产更加接近。 它包含一个基于 Python 语言的叫做 Torch Script 的脚本语言,也有能使现有代码与它自己兼容的方法。 + +#### 2\. 全新的 torch.distributed 库: “C10D” + +“C10D” 能够在不同的后端上启用异步操作, 并在较慢的网络上提高性能。 + +#### 3\. C++ 前端 (实验性功能) + +虽然它被特别提到是一个不稳定的 API (预计在预发行版中), 这是一个 PyTorch 后端的纯 c++ 接口, 遵循 API 和建立的 Python 前端的体系结构,以实现高性能、 低延迟的研究和开发直接安装在硬件上的 c++ 应用程序。 + +想要了解更多,可以在 GitHub 上查看完整的 [更新说明][9]。 + +第一个PyTorch 1.0 的稳定版本将在夏季发布。 + +### 在 Linux 上安装 PyTorch + +为了安装 PyTorch v1.0rc0, 开发人员建议使用 [conda][10], 同时也可以按照[本地安装][11]所示,使用其他方法可以安装,所有必要的细节详见文档。 + +#### 前提 + + * Linux + * Pip + * Python + * [CUDA][12] (对于使用 Nvidia GPU 的用户) + + + +我们已经知道[如何安装和使用 Pip][13],那就让我们来了解如何使用 Pip 安装 PyTorch。 + +请注意,PyTorch 具有 GPU 和仅限 CPU 的不同安装包。你应该安装一个适合你硬件的安装包。 +#### 安装 PyTorch 的旧版本和稳定版 + +如果你想在 GPU 机器上安装稳定版(0.4 版本),使用: + +``` +pip install torch torchvision + +``` + +使用以下两个命令,来安装仅用于 CPU 的稳定版: + +``` +pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl +pip install torchvision + +``` + +#### 安装 PyTorch 1.0 候选版本 + +使用如下命令安装 PyTorch 1.0 RC GPU 版本: + +``` +pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html + +``` +如果没有GPU,并且更喜欢使用 仅限CPU 版本,使用如下命令: + +``` +pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html + +``` + +#### 验证 PyTorch 安装 + +使用如下简单的命令,启动终端上的 python 控制台: +``` +python + +``` + +现在,按行输入下面的示例代码以验证您的安装: + +``` +from __future__ import print_function +import torch +x = torch.rand(5, 3) +print(x) + +``` + +你应该得到如下输出: + +``` +tensor([[0.3380, 0.3845, 0.3217], + [0.8337, 0.9050, 0.2650], + [0.2979, 0.7141, 0.9069], + [0.1449, 0.1132, 0.1375], + [0.4675, 0.3947, 0.1426]]) + +``` + +若要检查是否可以使用 PyTorch 的 GPU 功能, 可以使用以下示例代码: + +``` +import torch +torch.cuda.is_available() + +``` + +输出结果应该是: + +``` +True + +``` +支持 PyTorch 的 AMD GPU 仍在开发中, 因此, 尚未按[报告][14]提供完整的测试覆盖,如果您有 AMD GPU ,请在[这里][15]提出建议。 + +现在让我们来看看一些广泛使用 PyTorch 的研究项目: +### 基于 PyTorch 的持续研究项目 + + * [Detectron][16]: Facebook AI 研究院的软件系统, 可以智能地进行对象检测和分类。它之前是基于 Caffe2 的。今年早些时候,Caffe2 和 PyTorch [合力][17]创建了一个研究 + 生产的 PyTorch 1.0 + * [Unsupervised Sentiment Discovery][18]: 广泛应用于社交媒体的一些算法 + * [vid2vid][19]: 逼真的视频到视频的转换 + * [DeepRecommender][20] 我们在过去的[网飞的 AI 文章][21]中介绍了这些系统是如何工作的 + +领先的 GPU 制造商英伟达在[更新][22]这方面最近的发展,你也可以阅读正在进行的合作的研究。 + +### 我们应该如何应对这种 PyTorch 的能力? + +想到 Facebook 在社交媒体算法中应用如此令人惊叹的创新项目, 我们是否应该感激这一切或是感到惊恐?这几乎是[天网][23]! 这一新改进的发布的 PyTorch 肯定会推动事情进一步向前! 在下方评论,随时与我们分享您的想法! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pytorch-open-source-ai-framework/ + +作者:[Avimanyu Bandyopadhyay][a] +选题:[lujun9972](https://github.com/lujun9972) +译者:[distant1219](https://github.com/distant1219) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/avimanyu/ +[1]: https://pytorch.org/ +[2]: https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units +[3]: https://en.wikipedia.org/wiki/Tensor +[4]: https://www.techopedia.com/definition/32902/deep-neural-network +[5]: https://code.fb.com/ai-research/facebook-accelerates-ai-development-with-new-partners-and-production-capabilities-for-pytorch-1-0 +[6]: https://pytorch.fbreg.com/ +[7]: https://www.themidwaysf.com/ +[8]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/10/pytorch.jpeg +[9]: https://github.com/pytorch/pytorch/releases/tag/v1.0rc0 +[10]: https://conda.io/ +[11]: https://pytorch.org/get-started/locally/ +[12]: https://www.pugetsystems.com/labs/hpc/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184/ +[13]: https://itsfoss.com/install-pip-ubuntu/ +[14]: https://github.com/pytorch/pytorch/issues/10657#issuecomment-415067478 +[15]: https://rocm.github.io/install.html#installing-from-amd-rocm-repositories +[16]: https://github.com/facebookresearch/Detectron +[17]: https://caffe2.ai/blog/2018/05/02/Caffe2_PyTorch_1_0.html +[18]: https://github.com/NVIDIA/sentiment-discovery +[19]: https://github.com/NVIDIA/vid2vid +[20]: https://github.com/NVIDIA/DeepRecommender/ +[21]: https://itsfoss.com/netflix-open-source-ai/ +[22]: https://news.developer.nvidia.com/pytorch-1-0-accelerated-on-nvidia-gpus/ +[23]: https://en.wikipedia.org/wiki/Skynet_(Terminator)