{"id":450,"date":"2018-10-17T11:40:59","date_gmt":"2018-10-17T11:40:59","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/pytorch-1-0-preview-release-facebooks-newest-open-source-ai\/"},"modified":"2018-10-17T11:40:59","modified_gmt":"2018-10-17T11:40:59","slug":"pytorch-1-0-preview-release-facebooks-newest-open-source-ai","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/pytorch-1-0-preview-release-facebooks-newest-open-source-ai\/","title":{"rendered":"PyTorch 1.0 Preview Release: Facebook\u2019s newest Open Source AI"},"content":{"rendered":"<p>Last updated October 4, 2018 By <a href=\"https:\/\/itsfoss.com\/author\/avimanyu\/\">Avimanyu Bandyopadhyay<\/a> <a href=\"https:\/\/itsfoss.com\/pytorch-open-source-ai-framework\/#respond\">Leave a Comment<\/a> <\/p>\n<p>&#xD;<\/p>\n<p>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. <\/p>\n<p>For those who are not familiar, <a href=\"https:\/\/pytorch.org\/\" target=\"_blank\">PyTorch<\/a> is a Python-based library for Scientific Computing.<\/p>\n<p>PyTorch harnesses the <a href=\"https:\/\/en.wikipedia.org\/wiki\/General-purpose_computing_on_graphics_processing_units\" target=\"_blank\">superior computational power of Graphical Processing Units (GPUs)<\/a> for carrying out complex <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tensor\" target=\"_blank\">Tensor<\/a> computations and implementing <a href=\"https:\/\/www.techopedia.com\/definition\/32902\/deep-neural-network\" target=\"_blank\">deep neural networks<\/a>. So, it is used widely across the world by numerous researchers and developers.<\/p>\n<p>This new ready-to-use <a href=\"https:\/\/code.fb.com\/ai-research\/facebook-accelerates-ai-development-with-new-partners-and-production-capabilities-for-pytorch-1-0\" target=\"_blank\">Preview Release<\/a> was announced at the <a href=\"https:\/\/pytorch.fbreg.com\/\" target=\"_blank\">PyTorch Developer Conference<\/a> at <a href=\"https:\/\/www.themidwaysf.com\/\" target=\"_blank\">The Midway<\/a>, San Francisco, CA on Tuesday, October 2, 2018.<\/p>\n<h2>Highlights of PyTorch 1.0 Release Candidate<\/h2>\n<p><img decoding=\"async\" alt=\"PyTorhc is Python based open source AI framework from Facebook\" src=\"https:\/\/4bds6hergc-flywheel.netdna-ssl.com\/wp-content\/uploads\/2018\/10\/pytorch.jpeg\" \/><\/p>\n<p>Some of the main new features in the release candidate are:<\/p>\n<h3>1. JIT<\/h3>\n<p>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.<\/p>\n<h3>2. New torch.distributed library: \u201cC10D\u201d<br \/><\/h3>\n<p>\u201cC10D\u201d enables asynchronous operation on different backends with performance improvements on slower networks and more.<\/p>\n<h3>3. C++ frontend (experimental)<br \/><\/h3>\n<p>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.<\/p>\n<p>To know more, you can take a look at the complete <a href=\"https:\/\/github.com\/pytorch\/pytorch\/releases\/tag\/v1.0rc0\" target=\"_blank\">update notes<\/a> on GitHub.<\/p>\n<p>The first stable version PyTorch 1.0 will be released in summer.<\/p>\n<h2>Installing PyTorch on Linux<\/h2>\n<p>To install PyTorch v1.0rc0, the developers recommend using <a href=\"https:\/\/conda.io\/\" target=\"_blank\">conda<\/a> while there also other ways to do that as shown on their <a href=\"https:\/\/pytorch.org\/get-started\/locally\/\" target=\"_blank\">local installation page<\/a> where they have documented everything necessary in detail.<\/p>\n<h3>Prerequisites<\/h3>\n<ul>\n<li>Linux<\/li>\n<li>Pip<\/li>\n<li>Python <\/li>\n<li><a href=\"https:\/\/www.pugetsystems.com\/labs\/hpc\/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184\/\" target=\"_blank\">CUDA<\/a> (For Nvidia GPU owners)<\/li>\n<\/ul>\n<p>As we recently showed you <a href=\"https:\/\/itsfoss.com\/install-pip-ubuntu\/\" target=\"_blank\">how to install and use Pip<\/a>, let\u2019s get to know how we can install PyTorch with it.<\/p>\n<p>Note that PyTorch has GPU and CPU-only variants. You should install the one that suits your hardware.<\/p>\n<h3>Installing old and stable version of PyTorch<\/h3>\n<p>If you want the stable release (version 0.4) for your GPU, use:<\/p>\n<p>pip install torch torchvision<\/p>\n<p>Use these two commands in succession for a CPU-only stable release:<\/p>\n<p>pip install http:\/\/download.pytorch.org\/whl\/cpu\/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl<br \/>\npip install torchvision<\/p>\n<h3>Installing PyTorch 1.0 Release Candidate<\/h3>\n<p>You install PyTorch 1.0 RC GPU version with this command:<\/p>\n<p>pip install torch_nightly -f https:\/\/download.pytorch.org\/whl\/nightly\/cu92\/torch_nightly.html<\/p>\n<p>If you do not have a GPU and would prefer a CPU-only version, use:<\/p>\n<p>pip install torch_nightly -f https:\/\/download.pytorch.org\/whl\/nightly\/cpu\/torch_nightly.html<\/p>\n<h3>Verifying your PyTorch installation<\/h3>\n<p>Startup the python console on a terminal with the following simple command:<\/p>\n<p>python<\/p>\n<p>Now enter the following sample code line by line to verify your installation:<\/p>\n<p>from __future__ import print_function<br \/>\nimport torch<br \/>\nx = torch.rand(5, 3)<br \/>\nprint(x)<\/p>\n<p>You should get an output like:<\/p>\n<p>tensor([[0.3380, 0.3845, 0.3217],<br \/>\n [0.8337, 0.9050, 0.2650],<br \/>\n [0.2979, 0.7141, 0.9069],<br \/>\n [0.1449, 0.1132, 0.1375],<br \/>\n [0.4675, 0.3947, 0.1426]])<\/p>\n<p>To check whether you can use PyTorch\u2019s GPU capabilities, use the following sample code:<\/p>\n<p>import torch<br \/>\ntorch.cuda.is_available()<\/p>\n<p>The resulting output should be:<\/p>\n<p>True<\/p>\n<p>Support for AMD GPUs for PyTorch is still under development, so complete test coverage is not yet provided as reported <a href=\"https:\/\/github.com\/pytorch\/pytorch\/issues\/10657#issuecomment-415067478\" target=\"_blank\">here<\/a>, suggesting this <a href=\"https:\/\/rocm.github.io\/install.html#installing-from-amd-rocm-repositories\" target=\"_blank\">resource<\/a> in case you have an AMD GPU.<\/p>\n<p>Lets now look into some research projects that extensively use PyTorch:<\/p>\n<h2>Ongoing Research Projects based on PyTorch<br \/><\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/facebookresearch\/Detectron\" target=\"_blank\">Detectron<\/a>: Facebook AI Research\u2019s software system to intelligently detect and classify objects. It is based on Caffe2. Earlier this year, Caffe2 and PyTorch <a href=\"https:\/\/caffe2.ai\/blog\/2018\/05\/02\/Caffe2_PyTorch_1_0.html\" target=\"_blank\">joined forces<\/a> to create a Research + Production enabled PyTorch 1.0 we talk about.<\/li>\n<li><a href=\"https:\/\/github.com\/NVIDIA\/sentiment-discovery\" target=\"_blank\">Unsupervised Sentiment Discovery<\/a>: Such methods are extensively used with social media algorithms.<\/li>\n<li><a href=\"https:\/\/github.com\/NVIDIA\/vid2vid\" target=\"_blank\">vid2vid<\/a>: Photorealistic video-to-video translation<\/li>\n<li><a href=\"https:\/\/github.com\/NVIDIA\/DeepRecommender\/\" target=\"_blank\">DeepRecommender<\/a> (We covered how such systems work on our past <a href=\"https:\/\/itsfoss.com\/netflix-open-source-ai\/\" target=\"_blank\">Netflix AI article<\/a>)<\/li>\n<\/ul>\n<p>Nvidia, leading GPU manufacturer covered more on this with their own <a href=\"https:\/\/news.developer.nvidia.com\/pytorch-1-0-accelerated-on-nvidia-gpus\/\" target=\"_blank\">update<\/a> on this recent development where you can also read about ongoing collaborative research endeavours.<\/p>\n<h2>How should we react to such PyTorch capabilities?<\/h2>\n<p>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 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Skynet_(Terminator)\" target=\"_blank\">Skynet<\/a>! 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!<\/p>\n<p> &#xD;<br \/>\n <img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"70\" src=\"https:\/\/secure.gravatar.com\/avatar\/d22a32ada213033c3800d59638468abc?s=70&amp;d=mm&amp;r=g\" width=\"70\" \/><\/p>\n<h4>About Avimanyu Bandyopadhyay<\/h4>\n<p>Avimanyu is a Doctoral Researcher on GPU-based Bioinformatics and a big-time Linux fan. He strongly believes in the significance of Linux and FOSS in Scientific Research. Deep Learning with GPUs is his new excitement! He is a very passionate video gamer (his other side) and loves playing games on Linux, Windows and PS4 while wishing that all Windows\/Xbox One\/PS4 exclusive games get support on Linux some day! Both his research and PC gaming are powered by his own home-built computer. He is also a former Ubisoft Star Player (2016) and mostly goes by the tag &#8220;avimanyu786&#8221; on web indexes.<\/p>\n<p> <a href=\"https:\/\/itsfoss.com\/pytorch-open-source-ai-framework\/\" target=\"_blank\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last updated October 4, 2018 By Avimanyu Bandyopadhyay Leave a Comment &#xD; 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 is a Python-based library for &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/pytorch-1-0-preview-release-facebooks-newest-open-source-ai\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PyTorch 1.0 Preview Release: Facebook\u2019s newest Open Source AI&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-450","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=450"}],"version-history":[{"count":0,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/450\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}