{"id":1011,"date":"2021-10-11T08:38:34","date_gmt":"2021-10-11T08:38:34","guid":{"rendered":"https:\/\/salarydistribution.com\/machine-learning\/2021\/10\/11\/a-sneak-peek-at-torchvision-v0-11-memoirs-of-a-torchvision-developer-2\/"},"modified":"2021-10-11T08:38:34","modified_gmt":"2021-10-11T08:38:34","slug":"a-sneak-peek-at-torchvision-v0-11-memoirs-of-a-torchvision-developer-2","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2021\/10\/11\/a-sneak-peek-at-torchvision-v0-11-memoirs-of-a-torchvision-developer-2\/","title":{"rendered":"A sneak peek at TorchVision v0.11 \u2013 Memoirs of a TorchVision developer \u2013 2"},"content":{"rendered":"<div>\n<ul class=\"unstyled inline blog-info\">\n<li><i class=\"icon-calendar\"><\/i> October 10, 2021<\/li>\n<li><i class=\"icon-user\"><\/i> <a href=\"https:\/\/blog.datumbox.com\/author\/bbriniotis\/\" title=\"Posts by Vasilis Vryniotis\" rel=\"author\">Vasilis Vryniotis<\/a><\/li>\n<li> <a href=\"https:\/\/blog.datumbox.com\/a-sneak-peek-on-torchvision-v0-11-memoirs-of-a-torchvision-developer-2\/#respond\">. No comments<\/a><\/li>\n<\/ul>\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"770\" height=\"433\" src=\"https:\/\/blog.datumbox.com\/wp-content\/uploads\/2021\/10\/torchvision-v0.11-770x433.jpg\" alt=\"\" class=\"wp-image-1036\"><\/figure>\n<p>The last couple of weeks were super busy in \u201cPyTorch Land\u201d as we are frantically preparing the release of PyTorch v1.10 and TorchVision v0.11. In this 2nd instalment of <a href=\"https:\/\/blog.datumbox.com\/new-blog-series-memoirs-of-a-torchvision-developer\/\">the series<\/a>, I\u2019ll cover some of the upcoming features that are currently included in the release branch of TorchVision.<\/p>\n<p><strong>Disclaimer:<\/strong> Though the upcoming release is packed with numerous enhancements and bug\/test\/documentation improvements, here I\u2019m highlighting new \u201cuser-facing\u201d features on domains I\u2019m personally interested. After writing the blog post, I also noticed a bias towards features I reviewed, wrote or followed closely their development. Covering (or not covering) a feature says nothing about its importance. Opinions expressed are solely my own.<\/p>\n<h2>New Models<\/h2>\n<p>The new release is packed with new models:<\/p>\n<ul>\n<li>Kai Zhang has added an implementation of the <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4403\">RegNet architecture<\/a> along with pre-trained weights for <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4530\">14 variants<\/a> which closely reproduce the original paper.<\/li>\n<li>I\u2019ve recently added an implementation of the <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4293\">EfficientNet architecture<\/a> along with pre-trained weights for variants B0-B7 provided by Luke Melas-Kyriazi and Ross Wightman.<\/li>\n<\/ul>\n<h2>New Data Augmentations<\/h2>\n<p>A few new Data Augmentation techniques have been added to the latest version:<\/p>\n<ul>\n<li>Samuel Gabriel has contributed <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4221\">TrivialAugment<\/a>, a new simple but highly effective strategy that seems to provide superior results to AutoAugment.<\/li>\n<li>I\u2019ve added the <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4348\">RandAugment<\/a> method in auto-augmentations.<\/li>\n<li>I\u2019ve provided an implementation of <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4379\">Mixup and CutMix<\/a> transforms in references. These will be moved in transforms on the next release once their API is finalized.<\/li>\n<\/ul>\n<h2>New Operators and Layers<\/h2>\n<p>A number of new operators and layers have been included:<\/p>\n<h2>References \/ Training Recipes<\/h2>\n<p>Though the improvement of our reference scripts is a continuous effort, here are a few new features included in the upcoming version:<\/p>\n<ul>\n<li>Prabhat Roy has added support of <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4381\">Exponential Moving Average<\/a> in our classification recipe.<\/li>\n<li>I\u2019ve updated our references to support <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4335\">Label Smoothing<\/a>, which was recently introduced by Joel Schlosser and Thomas J. Fan on PyTorch core.<\/li>\n<li>I\u2019ve included the option to perform <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4411\">Learning Rate Warmup<\/a>, using the latest LR schedulers developed by Ilqar Ramazanli.<\/li>\n<\/ul>\n<h2>Other improvements<\/h2>\n<p>Here are some other notable improvements added in the release:<\/p>\n<ul>\n<li>Alexander Soare and Francisco Massa have developed an <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4302\">FX-based utility<\/a> which allows extracting arbitrary intermediate features from model architectures.<\/li>\n<li>Nikita Shulga has added support of <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4248\">CUDA 11.3<\/a> to TorchVision.<\/li>\n<li>Zhongkai Zhu has fixed the <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4288\">dependency issues<\/a> of JPEG lib (this issue has caused major headaches to many of our users).<\/li>\n<\/ul>\n<h2>In-progress &amp; Next-up<\/h2>\n<p>There are lots of exciting new features under-development which didn\u2019t make it in this release. Here are a few:<\/p>\n<ul>\n<li>Moto Hira, Parmeet Singh Bhatia and I have drafted an RFC, which proposes a new mechanism for <a href=\"https:\/\/github.com\/datumbox\/dapi-model-versioning\/\">Model Versioning<\/a> and for handling meta-data associated to pre-trained weights. This will enable us to support multiple pre-trained weights for each model and attach associated information such as labels, preprocessing transforms etc to the models.<\/li>\n<li>I\u2019m currently working on using the primitives added by the \u201c<a href=\"https:\/\/github.com\/pytorch\/vision\/issues\/3911\">Batteries Included<\/a>\u201d project in order to improve the accuracy of our <a href=\"https:\/\/github.com\/pytorch\/vision\/issues\/3995\">pre-trained models<\/a>. The target is to achieve best-in-class results for the most popular pre-trained models provided by TorchVision.<\/li>\n<li>Philip Meier and Francisco Massa are working on an exciting prototype for TorchVision\u2019s new <a href=\"https:\/\/github.com\/pytorch\/vision\/issues?q=+is%3Amerged+label%3Aprototype+label%3A%22module%3A+datasets%22\">Dataset<\/a> and <a href=\"https:\/\/github.com\/pmeier\/torchvision-datasets-rework\/pull\/1\">Transforms<\/a> API.<\/li>\n<li>Prabhat Roy is working on extending PyTorch Core\u2019s <code>AveragedModel<\/code> class to support the <a href=\"https:\/\/github.com\/pytorch\/pytorch\/pull\/65495\">averaging of the buffers<\/a> in addition to parameters. The lack of this feature is commonly reported as bug and will <a href=\"https:\/\/github.com\/pytorch\/pytorch\/pull\/65495#issuecomment-929988377\">enable numerous downstream libraries<\/a> and frameworks to remove their custom EMA implementations.<\/li>\n<li>Aditya Oke <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4216\">wrote a utility<\/a> which allows <a href=\"https:\/\/github.com\/pytorch\/vision\/issues\/3365\">plotting the results<\/a> of Keypoint models on the original images (the feature didn\u2019t make it to the release as we got swamped and couldn\u2019t review it in time ? )<\/li>\n<li>I\u2019m building a <a href=\"https:\/\/github.com\/pytorch\/vision\/pull\/4549\">prototype FX-utility<\/a> which aims to to detect Residual Connections in arbitrary Model architectures and modify the network to add regularization blocks (such as <code>StochasticDepth<\/code>).<\/li>\n<\/ul>\n<p>Finally there are a few new features in our backlog (PRs coming soon):<\/p>\n<p>I hope you found the above summary interesting. Any ideas on how to adapt the format of the blog series are very welcome. Hit me up on\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/www.linkedin.com\/in\/bbriniotis\" target=\"_blank\">LinkedIn<\/a>\u00a0or\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/twitter.com\/bbriniotis\" target=\"_blank\">Twitter<\/a>.<\/p>\n<div class=\"authorsure-author-box\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/secure.gravatar.com\/avatar\/0d9cf005f5d9fbbe42b6723e723a7f76?s=90&amp;r=g\" class=\"avatar avatar-90 photo\" height=\"90\" width=\"90\" loading=\"lazy\"><\/p>\n<h4>About\u00a0<a rel=\"author\" href=\"https:\/\/blog.datumbox.com\/author\/bbriniotis\/\" class=\"authorsure-author-link\">Vasilis Vryniotis<\/a><\/h4>\n<p>My name is Vasilis Vryniotis. I&#8217;m a Data Scientist, a Software Engineer, author of Datumbox Machine Learning Framework and a proud geek. <a href=\"https:\/\/blog.datumbox.com\/author\/bbriniotis\/\">Learn more<\/a><\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/blog.datumbox.com\/a-sneak-peek-on-torchvision-v0-11-memoirs-of-a-torchvision-developer-2\/<\/p>\n","protected":false},"author":0,"featured_media":1012,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1011"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=1011"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/1012"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=1011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=1011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=1011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}