<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jay Rodge on Medium]]></title>
        <description><![CDATA[Stories by Jay Rodge on Medium]]></description>
        <link>https://medium.com/@jayrodge?source=rss-d4998a3bae22------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IBQcaRTiGLIFbuN2XVErTA.png</url>
            <title>Stories by Jay Rodge on Medium</title>
            <link>https://medium.com/@jayrodge?source=rss-d4998a3bae22------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 07 Apr 2026 14:06:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jayrodge/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Scaling AI Reasoning: Key GTC 2025 Announcements for LLM Developers]]></title>
            <link>https://medium.com/@jayrodge/scaling-ai-reasoning-key-gtc-2025-announcements-for-llm-developers-f33c49b98b2f?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/f33c49b98b2f</guid>
            <category><![CDATA[reasoning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[gpu]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 06:30:22 GMT</pubDate>
            <atom:updated>2025-03-19T06:30:22.143Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulkFo3VgnNp2QAIVDL9LeA.png" /></figure><p>As the “Super Bowl of AI,” this year’s GTC highlighted significant advancements in hardware and software specifically designed to address the growing demands of large language models.</p><p>Here’s a concise recap of the announcements most relevant to you as an LLM developer.</p><h3>The Focus on Scale and Reasoning in LLMs</h3><h3>AI Scaling Laws</h3><p>Scaling laws continue to drive exponential demand for compute power. As models grow larger and more complex, the need for efficient hardware and software solutions becomes critical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CgbhkDhI9M3Q3nFh" /></figure><p>Jensen highlighted how test-time scaling — applying more compute during inference — enhances reasoning capabilities, enabling models to solve increasingly complex problem.</p><h3>Reasoning in LLMs</h3><p>The keynote emphasized a major shift toward reasoning capabilities in LLMs. To support these reasoning-focused models, here are the key announcements:</p><ul><li><a href="https://developer.nvidia.com/blog/introducing-nvidia-dynamo-a-low-latency-distributed-inference-framework-for-scaling-reasoning-ai-models/"><strong>NVIDIA Dynamo</strong></a>: A new open-source inference serving library designed specifically to accelerate and scale reasoning workloads. Dynamo efficiently distributes inference across GPUs, dramatically boosting throughput (up to 30X for DeepSeek-R1 models).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rQGiuZ0fFsHrlFEQ" /><figcaption>AI inference-serving software designed to maximize token revenue generation for AI factories deploying reasoning AI models</figcaption></figure><p><a href="https://developer.nvidia.com/blog/build-enterprise-ai-agents-with-advanced-open-nvidia-llama-nemotron-reasoning-models/"><strong>NVIDIA Llama Nemotron Reasoning</strong></a>: NVIDIA’s latest family of open reasoning models, optimized for enterprise use cases. These models deliver best-in-class accuracy across benchmarks like GPQA Diamond and MATH 500, thanks to advanced distillation techniques, supervised fine-tuning, and reinforcement learning alignment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2M6LG3aE-1sjnCWQ" /><figcaption>5x higher throughput</figcaption></figure><p>These models come in three sizes:</p><ul><li>Nano (8B): Distilled from Llama 3.1 8B for edge and PC deployment</li><li>Super (49B): Distilled from Llama 3.3 70B for optimal accuracy and throughput on data center GPUs</li><li>Ultra (253B): Distilled from Llama 3.1 405B for maximum agentic accuracy (coming soon).</li></ul><h3>Hardware Innovations for LLM Workloads</h3><h3>Blackwell Ultra GPU</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UnSJksLucxBUVyLp" /><figcaption>NVIDIA Blackwell Ultra Enables AI Reasoning</figcaption></figure><ul><li>Delivers up to 1.5 ExaFLOPS FP4 performance per GPU, ideal for large-scale LLM inference tasks.</li><li>Features HBM3e memory with up to 288GB per GPU, dramatically improving memory bandwidth and capacity for handling large model parameters.</li><li>Optimized specifically for reasoning workloads, enabling faster inference and higher accuracy at scale</li></ul><h3>DGX Systems</h3><p>NVIDIA introduced t<a href="https://nvidianews.nvidia.com/news/nvidia-announces-dgx-spark-and-dgx-station-personal-ai-computers">wo new personal AI supercomputers</a> designed to empower developers directly from their desktops:</p><p><strong>DGX Spark</strong>: Compact desktop AI system featuring GB10 Superchip with 128GB unified memory, ideal for prototyping and fine-tuning LLMs locally. Reservations for <a href="https://www.nvidia.com/en-us/products/workstations/dgx-spark/">DGX Spark systems</a> open today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7Cqrb0tb-I9mmhmT" /><figcaption>DGX Spark is the world’s smallest AI supercomputer</figcaption></figure><p><strong>DGX Station</strong>: High-performance desktop solution powered by GB300 Grace Blackwell Ultra Superchip, delivering up to 20 PFLOPS FP4 performance and 784GB coherent memory. This system supports intensive local development and rapid iteration of large-scale model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sb4-hgs_mM01Yw1w" /><figcaption>DGX Station is expected to be available from manufacturing partners like ASUS, BOXX, Dell, HP, Lambda and Supermicro later this year.</figcaption></figure><h3>Tools for Building Intelligent Agents</h3><p>To simplify building sophisticated agentic systems, NVIDIA launched two powerful tools:</p><ul><li><a href="https://github.com/NVIDIA/AgentIQ"><strong>AgentIQ</strong></a>: An open-source Python library designed to streamline the development of multi-agent AI systems. It offers reusable components, easy configuration via YAML files, detailed telemetry profiling, and built-in optimization tools for efficient agent workflows.</li><li><a href="https://blogs.nvidia.com/blog/ai-agents-blueprint/"><strong>AI-Q Blueprint</strong></a>: A comprehensive reference architecture leveraging reasoning capabilities to seamlessly connect AI agents with enterprise data and tools. It integrates multimodal retrieval (via NeMo Retriever), optimized microservices (via NIM), and agent orchestration (via AgentIQ), providing a robust foundation for enterprise-grade agentic applications</li></ul><h3>Conclusion</h3><p>GTC keynote highlighted significant leaps forward in hardware, software frameworks, and tools that directly empower LLM developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*adyl9YHCRoF-Pa5Q" /></figure><p>With innovations like Blackwell Ultra GPUs, Dynamo library, advanced Nemotron reasoning models, and robust tooling such as AgentIQ and AI-Q Blueprint, <a href="https://www.linkedin.com/company/nvidia/">NVIDIA</a> continues to equip developers with everything needed to build the next generation of intelligent applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f33c49b98b2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accelerating PyTorch Inference with Torch-TensorRT on GPUs]]></title>
            <link>https://medium.com/pytorch/accelerating-pytorch-inference-with-torch-tensorrt-on-gpus-896e06ff1637?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/896e06ff1637</guid>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[stories]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Thu, 16 Jun 2022 14:21:09 GMT</pubDate>
            <atom:updated>2022-06-16T14:21:09.190Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiZ_bHavO0aWI-mPMyfASQ.png" /></figure><p>Today, we are pleased to announce that Torch-TensorRT has been brought to PyTorch. The official repository for Torch-TensorRT now sits under <a href="https://github.com/pytorch/TensorRT">PyTorch GitHub org</a> and documentation is now hosted on <a href="http://pytorch.org/TensorRT">pytorch.org/TensorRT</a>.</p><p>Torch-TensorRT is now an official part of the PyTorch ecosystem. The PyTorch ecosystem includes projects, tools, models and libraries from a broad community of researchers in academia and industry, application developers, and ML engineers.</p><p>Torch-TensorRT aims to provide PyTorch users with the ability to accelerate inference on NVIDIA GPUs with a single line of code.</p><h4><strong>Torch-TensorRT</strong></h4><p><a href="https://developer.nvidia.com/tensorrt">NVIDIA TensorRT</a> is an SDK for high-performance deep learning inference that delivers low latency and high throughput for inference applications across GPU-accelerated platforms running in data centers, embedded and edge devices.</p><p>Torch-TensorRT is an integration for PyTorch that leverages inference optimizations of TensorRT on NVIDIA GPUs. With just one line of code, it provides a simple API that gives up to 4x performance speedup on NVIDIA GPUs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BoC0vecomfBplVX4V7bLCA.png" /></figure><p>This integration takes advantage of TensorRT optimizations, such as FP16 and INT8 reduced precision through Post-Training quantization and Quantization Aware training, while offering a fallback to native PyTorch when TensorRT does not support the model subgraphs.</p><h4><strong>Getting Started</strong></h4><pre>import torch_tensorrt</pre><pre>trt_module = torch_tensorrt.compile(model,<br>    inputs = [torch_tensorrt.Input((1, 3, 224, 224))], # input shape   <br>    enabled_precisions = {torch_tensorrt.dtype.half} # Run with FP16<br>)</pre><pre># save the TensorRT embedded Torchscript<br>torch.jit.save(trt_module, “trt_torchscript_module.ts”)</pre><pre>result = trt_module(input_data) # Run inference</pre><p>Learn more about Torch-TensorRT’s features with a detailed walkthrough example <a href="https://developer.nvidia.com/blog/accelerating-inference-up-to-6x-faster-in-pytorch-with-torch-tensorrt/">here</a>.</p><h4>Summary</h4><p>PyTorch is a leading deep learning framework today, with millions of users worldwide. Torch-TensorRT enables PyTorch users with extremely high inference performance on NVIDIA GPUs while maintaining the ease and flexibility of PyTorch through a simplified workflow when using TensorRT with a single line of code.</p><p>Download and try samples from GitHub Repository <a href="https://github.com/pytorch/TensorRT">here</a> and full documentation can be found <a href="https://pytorch.org/TensorRT">here</a>.</p><p>We would be deeply appreciative of feedback on the Torch-TensorRT by reporting any issues via <a href="http://github.com/pytorch/TensorRT">GitHub</a> or <a href="https://forums.developer.nvidia.com/c/ai-data-science/deep-learning/tensorrt/92">TensorRT discussion forum</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=896e06ff1637" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pytorch/accelerating-pytorch-inference-with-torch-tensorrt-on-gpus-896e06ff1637">Accelerating PyTorch Inference with Torch-TensorRT on GPUs</a> was originally published in <a href="https://medium.com/pytorch">PyTorch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product Marketing 101]]></title>
            <link>https://medium.com/@jayrodge/product-marketing-101-7625605db488?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/7625605db488</guid>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 03:42:59 GMT</pubDate>
            <atom:updated>2020-09-01T03:44:05.597Z</atom:updated>
            <content:encoded><![CDATA[<h3>Product Marketing 101 (Part 2)</h3><p>Product Lifecycle Part 2 of 4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*6oCYitJ19yMKVLIk" /></figure><p>All successful products go through a Product Lifecycle, which is to say they pass through the following stages:</p><ul><li>Development</li><li>Introduction</li><li>Growth</li><li>Maturity</li><li>Decline</li></ul><p>We often depict this lifecycle along a bell-shaped curve to demonstrate the trajectory that most products take, which looks like as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqxLXhSNmIT5fmwNiDcKlQ.png" /><figcaption>Product Lifecycle</figcaption></figure><p>It’s important to know this lifecycle because of the role of Product Marketing Manager and the goals in product marketing change depending on which phase the product is in.</p><p><strong>Development</strong>: Effort to create the product and prepare it for release into the market. From there, we launch the product into the market</p><p><strong>Introduction</strong>: Generate awareness, build brand identity, and achieve market penetration</p><p><strong>Growth</strong>: Increase consumer adoption and build brand preference and market share</p><p><strong>Maturity</strong>: Maintain market share, defend itself from the competition, building a reputation, and find opportunities to increase revenue.</p><p><strong>Decline</strong>: Loses desirability and companies must decide to improve it with new features, discontinue it, or pivot</p><p>Understanding the lifecycle stage the product is in, is important, but knowing what’s ahead is just as important.</p><p>Having a short-term view or tunnel vision on a particular phase may lead to making decisions that hurt the next stage of the lifecycle. It’s early in the process to do a full assessment, but take 15 to 20 minutes and evaluate what stage you think the product is in. If you’re not actively involved with a product, pick a product that you’ve recently started using and work through the same exercise.</p><p><strong>Development Phase</strong></p><p>No amount of marketing or advertising can make up for a substandard product. Skimp on the development phase and you’ll find yourself struggling in future stages of the product lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/0*fYylOaYZzCj3R4fg.jpeg" /></figure><p>In the development stage, you’re still figuring out what it is you’re building. It might be an entirely new product, a major improvement, or a new feature. During this phase, the focus is to figure out what the market wants. It&#39;s here that you’re researching the competition, understanding the users, and determining what your product must have in order to be successful at launch. You want to do everything you can to get the product right. You must have sufficient features to satisfy your innovators and your early adopters. You can’t satisfy the entire market at launch, so narrow your approach to resonate with this consumer group.</p><p>Consider Amazon’s attempt at entering the mobile phone market. In 2014, Amazon launched the Amazon Fire phone. The marketing was everywhere. They clearly invested impressive capital to drive awareness on their new device, but the market didn’t respond well to the product at all. The entire product was scrapped less than 13 months after launch. Even huge marketing budgets can’t overcome a product that misses the mark.</p><p>So here are the steps that you want to take during the development stage:</p><p><strong>First</strong>, embed yourself in the product development process. Product marketing must work hand in hand with product development throughout this first stage unless the product is too tech-focused. Find ways to be part of the process, if the product team has daily standup sessions, start attending them, ask questions. Attend every planning meeting and get access to the planning software that’s being used.</p><p><strong>Next</strong>, take ownership of <strong>researching </strong>the target market. Its really important that you understand who you’re targeting, what you’re building, and how your messaging it is going to depend on who will ultimately be buying this product.</p><p>Now be sure you know the answers to these key questions:</p><p>-Who is the target market? <br>-Who is the decision-maker in the purchasing process? <br>-What is the awareness of the existing products available on the market? <br>-Are customers satisfied with the products available?</p><p>Then, demonstrate how your audience will perceive the new product. There’s no reason to launch into the unknown. Start describing how you think your audience will perceive this new product. Include a summary of their needs. Why their needs aren’t being met and how you plan to meet those needs. You can do this by releasing a beta, conducting a digital survey, or setting up interviews with existing customers or consumers in your target market.</p><p>And finally, understand the product completely. Go beyond just the features, know what it will cost to produce, what the risks are in development, and how much it will cost to maintain. You also want to know what happens if consumers are unhappy and what features are going to come later and so on. Even if you’re jumping into product marketing well after development, still go through this exercise as if you’re about to launch, it will reveal important details about your product.</p><h4>Introduction phase</h4><p>When your product is first brought to the market, it’s in the introduction stage. You’ve decided what to build, you’ve built it, and now it’s available to the consumer. But during this stage, demand is not yet proven. You’re working to validate that what you built resonates with the early adopters in your target market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*WIQn4U3UVCe4-bNj.jpg" /></figure><p>In the introduction phase, sales are likely to be minimal and growth is fairly flat. It’s tempting to put the gas pedal down and start ramping up your marketing efforts. Instead, you wanna start the introduction phase by focusing on testing. Once you’ve determined that customers are responding favorably, you push forward with your marketing to generate awareness and grab a foothold in the market.</p><p>Now during this phase, you can get away with higher prices, more selective placements, and very personalized promotions. Your immediate goal is the evaluate the consumer response.</p><p>So be sure you can answer these three questions:</p><p><strong>First</strong>, what is the consumer reaction to the product? <br>Are they responding favorably to the initial exposure? <br>Are there specific features or attributes they like or dislike? <br>Are there specific elements they prefer against the competition?</p><p><strong>Second</strong>, what are the consumer concerns about the product?</p><p><strong>Third</strong>, what are the consumer’s unmet or unstated needs?</p><p>You can conduct surveys, review your customer support interactions, or listen to conversations happening on social media to gather this data. Once you know the market response, you can decide to go back, and fine-tune the product, or press on. Once you press on, your goals will change to generating awareness and establishing a foothold in the market.</p><p>Now the introduction phase had a misleading name. Introductions are usually fairly quick. But in the product life cycle, this can take a while. So work to constantly improve your messaging, adjust your value propositions, and keep the feedback loop open with your customers, so you can fine-tune your marketing and unlock the next stage.</p><h4><strong>Growth Phase</strong></h4><p>When the product has generated awareness and it has increased consumer demand, you’re moving into the growth phase. Throughout this phase, you’ll be deploying various marketing strategies to significantly increase your growth curve. The focus is to get consumers to prefer your brand over other options. This will require differentiating your marketing strategy and testing new approaches. How quickly you move from the introduction stage to the growth stage, and how rapidly sales increase, will vary. But you’ll recognize a few key attributes of this stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*4lXSLJrzOVQ3YzU-.jpg" /></figure><p>First, you’ll begin to see an increase in competition. When the demand for your product starts to increase, other companies will look to enter the market. You’ll need to begin to adjust your marketing strategies so that you can defend yourself from the new market entrants.</p><p>Secondly, you can expect the size of the market to increase, which increases the demand for the product and ultimately leads to a sharp increase in sales.</p><p>And lastly, you’ll start to see increased profits.</p><p>Typically, you’ve figured out how to reduce your costs by this stage, marketing and the business as a whole tends to be more efficient.</p><p>Take Tesla, for example, they started by producing an expensive all-electric sports car aimed at innovators or early adopters. They learned about the process, the business, and the market. Then, they moved on to more mainstream but still high-priced vehicles with their sedan and an SUV. The cost kept their market size small, but this was their introduction phase. They tested the market, evaluated the response, and generated a ton of brand awareness in the process. From there, they launched an affordable sedan aimed at a much larger market, and it’s there that growth really took off. Now many other car companies are developing fully electric vehicles.</p><p>This increase in competition helps demonstrate that Tesla is now in that growth stage. So what are your goals for product marketing during growth? Well, first evaluate existing value propositions. You must understand that as the market expands, perceptions shift. Reevaluate the value propositions and your key differentiators. Verify the messaging is resonating with this new audience. You may need to work to improve product quality or add new features, or even support services to increase that market share.</p><p><strong>Next</strong>, listen intently. Launch customer interviews again, and dig deeper into why new customers are coming on board. Sit down and review customer service records to understand pain points. Work with the sales team to determine where they have friction in their sales process, and listen in on other consumers to evaluate new market segments to enter.</p><p><strong>Third</strong>, strategize. Now is when all the common marketing tactics come out. Visit opportunities in content marketing, digital, PR, trade shows, and so on. Look to increase your distribution channels and start shifting your marketing messages from product awareness to product preference. You’ve departed from your go-to-market strategy and you’re now deploying a wide array of marketing and advertising efforts.</p><p>And <strong>finally</strong>, measure. Measure the metrics that matter. Understand what your business goals are and which metrics demonstrate your success. A robust analysis will help you readjust your marketing strategies. Throughout your growth phase, I encourage you to explore and practice the benefits of Agile marketing.</p><h4><strong>Maturity Phase</strong></h4><p>Eventually, demand levels off, your sales peak, and growth become a lot less aggressive. It’s here that the market is nearly saturated. At this point, a product has reached the maturity stage. Your focus now is to defend your turf and prolong your product lifecycle. You’re working to maintain brand preference while at the same time, trying to keep your price competitive so it maintains profitability.</p><p>You’re also going to be making finer and finer differentiation in your product as longevity tends to cause competing products to get closer and closer to being identical. Plus, you must be ready for consumers to launch new features and try to distance themselves from you. The real goal here is to stop trying to prolong the inevitable. You need to start thinking about ways to disrupt your business model before someone else does.</p><p>Take Blue Apron, for example, this online meal kit delivery service was founded in 2012 and spent quite some time in the introduction phase before entering a growth phase in 2015. Competitors saw this and flooded the market, brands like HelloFresh and Home Chef. And then, Blue Apron hit maturity. They filed for a public offering in 2017, but as of May in 2018, they’ve lost 81% of their market value since that public offering. Growth is flat, the market is crowded, and now they’re forced to defend their turf and pursue differentiation.</p><p>Now, maturity isn’t bad, and it doesn’t always mean a loss in market value. It just comes with its own set of challenges. So then, what are the product marketing goals during this stage? For starters, understand what changes have occurred since the introduction and growth phases. Evaluate where the brand started and where it is now.</p><p>Really understand the <strong>consumer </strong>mindset.</p><p>-How did they become aware of the product? <br>-Why did they consider it? Why did they purchase it? <br>-Why did they not purchase?</p><p>Evaluate all the details. What are consumers saying about the competition and their products? Are they talking about any perceived differentiation or new features? Use this to arm your product team with ideas for new features and to modify your messaging and marketing angles.</p><p>Next, consider new marketing segments. It may be possible to redefine your target market or even enter new market segments altogether. Perhaps, Blue Apron looks at developing a college line. It may even be necessary to pivot and find different ways other markets can use the product.</p><p>Third, attack the competition, know that you’re at war. Apple’s iPhone is a mature product, and it never stops chasing after the competition. And the competition never stops chasing after the iPhone.</p><p>Fourth, seek bigger opportunities. Other key brand advocates and influencers that have emerged since the product entered the maturity phase, can they be engaged moving forward? <br>Are there new products in the market that are in their growth stage where alignment or strategic partnership becomes valuable, for instance?</p><p>Finally, leverage your loyal customers. Use those customers that are loyal and evangelist to your advantage. Survey them, offer them incentives, and consider ways to get them to spread the word to, late adopters and laggards who you know to be skeptical and difficult to convert.</p><p>The maturity phase is a great place to be, but don’t get complacent and assume that you’re in bedrock. It’s a different marketing game, so stay on top of it.</p><h4><strong>Decline Phase</strong></h4><p>When market maturity tapers off, products enter the final phase, decline. During the end stages of a product, you’ll see declining sales and profits. Consumers get bored, technology evolves, companies make mistakes, and people’s preferences change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0LkCJSzGfyNVsOEU.jpg" /></figure><p>Consider a few popular technology products that have changed over the last few years. DVD subscriptions with Netflix shifted to online streaming. Apple’s iPod line is essentially now a simplified iPhone. Digital cameras are less popular, as phone cameras are sufficient. Standalone GPS products are being replaced by Google Maps on mobile phones.</p><p>Now, all of those products still have a foothold somewhere. They’ve just shifted to new markets and reduced distribution, cut prices, or adjusted the features. They’re in decline. It’s not over yet. But very few products make it out of this decline stage. They can hold on for quite some time, but they hit the bottom eventually.</p><p>Now, this isn’t to say the business is doomed, just that the product offered as-is by the business is likely on the way out. At this stage, your primary goal is to pick a strategy that makes the most sense for your product. Now, the most popular strategies are to reduce your marketing expense on the product and thin the teams out, implement price cuts to convince late-stage and laggers to buy the product, find another use for the product, maintain the product and wait for the market to shift back, sell the product off to another company, or discontinue it altogether.</p><p>Product Marketing tends to take a backseat once a product is in decline. There tends to be limited support for investing in marketing spend. Now, there’s little for marketing to do in a true decline, but products can flirt with the decline stage or even enter decline prematurely, and this can happen abruptly. A product in the midst of growth is all of a sudden fast-tracked to decline, and this typically happens for two reasons. The product saw too high a rate of a refresh, or the product failed to meet the necessary rate of a refresh.</p><p>In product marketing, you must keep a pulse on the consumer. It’s not strictly about the marketing campaigns. It’s about maintaining product-market fit. If you’re updating a product too frequently, changing the core features that consumers liked, you may see customers depart. Think about products that went through unnecessary redesigns, leaving consumers dissatisfied and confused.</p><p>Alternatively, some products fail to change. In some markets, consumers expect seasonal refreshes. They expect new features. The iPhone must always evolve. The market expects it. If Apple stops innovating, the consumer will pursue a brand or product that does. If you’re in decline, embrace it. Either sunset the product or find a way to reinvent it so that it moves back to an earlier stage of the lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*h3usEe6WZtrIxDP1.jpg" /></figure><p>By creatively repositioning your product, you can change the way consumers evaluate it and potentially rescue them from decline, and push them back into growth.</p><p>This was the Part of Product Marketing series, I’ll be posting the Part 3 next week (09/08)</p><p>Part 1: What is Product Marketing? (<a href="https://medium.com/@jayrodge/product-marketing-101-cc99286e0bdc">link</a>)</p><p>Part 2: Product Lifecycle (<a href="https://medium.com/@jayrodge/product-marketing-101-7625605db488">link</a>)</p><p>Part 3: Product Market Fit (Coming on 09/08)</p><p>Part 4: Go-To-Market Plan (Coming on 09/14)</p><p>Connect with me on LinkedIn: <a href="https://www.linkedin.com/in/jayrodge">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7625605db488" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product Marketing 101]]></title>
            <link>https://medium.com/@jayrodge/product-marketing-101-cc99286e0bdc?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc99286e0bdc</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Mon, 24 Aug 2020 02:52:40 GMT</pubDate>
            <atom:updated>2020-09-01T03:52:48.951Z</atom:updated>
            <content:encoded><![CDATA[<h3>Product Marketing 101 (Part 1)</h3><p>What is Product Marketing (Part 1 of 4)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IFuj1oUcISpV5IXtyMvg1w.png" /></figure><p>One of the biggest challenges in marketing today is becoming too focused on tactical, buying ads, designing emails, creating blog content, etc. We often forget that the most successful aspect of marketing is understanding what the customer wants, and how to align products with their needs. This is handled through product marketing, and it’s among one of the most important areas of marketing at any organization.</p><p><strong>What is Product Marketing?</strong></p><p>Product marketing is ultimately the sum of all the efforts necessary to research, message, position, promote, and support a new product so that it successfully resonates with the target audience.</p><p>Product marketing requires participating in discovery, delivery, and ultimately, a go-to-market strategy. Now that’s all fairly broad. So let me give you some examples of these specific efforts.</p><p>So specific tasks that you might encounter:</p><ul><li>Coordinating with the product teams to understand roadmaps and deliverables</li><li>Conducting market research to understand customer needs and wants</li><li>Forecasting results</li><li>Competitive intelligence to understand the market</li><li>Go-To-Market campaign strategies</li></ul><p>Furthermore, being successful in product marketing means you’re constantly hedging against risk. Ideally, the work starts well before the product is developed.</p><p>You have to understand the market, what the customer really wants, and how your product will deliver. All too often, companies make the fatal mistake of handing a marketer a finished product and saying, here, go “market this”.</p><p>To be successful, you need to be armed with not only the knowledge of how product marketing works but also the confidence to put on the brakes and push the company to shift directions if you sense disaster ahead.</p><p><strong>Product Management vs Product Marketing</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEzj0ls0i-qyzSyNQCQhZg.png" /></figure><p>Describing simply, the Product Manager’s job is to get the product to the shelf and the Product Marketing Manager’s job is to get it off the shelf. The Product Manager develops the product, the Product Marketer packages it attractively and designs campaigns to motivate consumers to purchase it.</p><p>Despite their different job roles, product managers and product marketers have a few things in <strong>common</strong>:</p><ul><li>They both invest tremendous effort in knowing who their customer is.</li><li>They collaborate with teams across the entire organization and they must work together to see meaningful results.</li></ul><p>The <strong>Product Marketing Manager</strong> typically takes on the following responsibilities:</p><ul><li>Researching the market and segmenting the target customers. Positioning and messaging the product and its features.</li><li>Understanding the competitive landscape.</li><li>Securing product and message market fit.</li><li>Driving demand and adoption of the product.</li></ul><p>The <strong>Product Manager</strong>’s responsibilities focused on:</p><ul><li>Being the voice of the customer and championing what they want internally.</li><li>Decide what to build and organizing that process.</li><li>Understand the technology and managing scale.</li><li>Ship the right product and</li><li>Prioritize what to build.</li></ul><p>Both roles must work hand-in-hand, but it’s not always easy. Product managers are often using a different set of success metrics to determine what they’re prioritizing. They may be focused on positive user reviews, whereas product marketing might be measuring success by consumer activations or overall brand awareness. To prevent friction, clarify goals with product management. Agree to align your goals towards what the company’s major objective is. Take time to meet weekly and be transparent and thorough in your communication.</p><p>This was the Part of Product Marketing series, I’ll be posting the Part 2 next week (08/31)</p><p>Part 1: What is Product Marketing? (<a href="https://medium.com/@jayrodge/product-marketing-101-cc99286e0bdc">link</a>)</p><p>Part 2: Product Lifecycle (<a href="https://medium.com/@jayrodge/product-marketing-101-7625605db488">link</a>)</p><p>Part 3: Product Market Fit (Coming on 09/08)</p><p>Part 4: Go-To-Market Plan (Coming on 09/14)</p><p>Connect with me on LinkedIn: <a href="https://www.linkedin.com/in/jayrodge">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc99286e0bdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Engineer vs Data Scientist]]></title>
            <link>https://medium.com/@jayrodge/machine-learning-engineer-vs-data-scientist-befa63bc1ce4?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/befa63bc1ce4</guid>
            <category><![CDATA[machine-learning-engineer]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[requirements]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Fri, 07 Feb 2020 17:33:07 GMT</pubDate>
            <atom:updated>2020-04-20T00:12:22.705Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fmachine-learning-engineer-vs-data-scientist-befa63bc1ce4&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2Fbefa63bc1ce4&amp;image=https%3A%2F%2F2%2ABqw-oC-z51DSGfXWNNXxww.jpeg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/efa2b2a72c9414d666557f6995461433/href">https://medium.com/media/efa2b2a72c9414d666557f6995461433/href</a></iframe><p>How these roles are different?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*Cz8nxCxOWnAE2JY1fmpg2A.jpeg" /></figure><p>The role of a Machine Learning Engineer is relatively new, and it confuses so many people. This article will give an overview of each role and how they are different.</p><p>Let&#39;s have a look at what Data Science and Machine Learning is, before talking about the roles.</p><p><strong>Data Science</strong></p><p>Data science analyzes the data and uses the results to draw a causal inference. The goal of data science is to help companies understand their current state, find reasons for something that has happened in the past and come up with the best solutions for the future.</p><p><strong>Machine Learning</strong></p><p>Machine learning technology uses data-driven algorithms in simple words, so that a machine (software application) can learn and draw data-based assumptions. The more data the machine is “fed” to, the better the predictions. So predictions will be more accurate if the data is processed well.</p><h3><strong>The Difference</strong></h3><p>What could be a better way to ask someone who has experience in both roles. So for this, I reached out to <a href="https://www.brandonschabell.com/">Brandon Schabell</a>, who has experience in working as a Senior Data Scientist as well as a Senior Machine Learning Engineer. Here’s how he explains it:</p><p>The definitions of each role are definitely going to vary from company to company. In fact, at my current company (GoHealth), they are literally the same position. I just wanted a different title for different reasons</p><p>There are a couple of distinct areas within data science where people could spend the majority of their time. There are companies where data scientists exclusively do machine learning and modeling, but there are plenty of others where a data scientist’s role is really doing data analysis. It could be advanced, even using machine learning at times, but the end product there is often business insight rather than a product.</p><p>I think at a lot of companies, a machine learning engineer could be pretty accurately defined as being the type of data scientist that focuses on machine learning. There’s often a larger software engineering component to a machine learning engineer&#39;s job, however. A machine learning engineer may or may not be involved in the development of a model, but they are almost always the ones to optimize the model and put it into production. A lot of financial institutions will have a stricter differentiation if you look at quantitative researchers (quants) vs quantitative developers. (Which is similar to a data scientist vs machine learning engineer if you are in any other field.)</p><p>I quite enjoy both model building and some of the new challenges of putting complex models into stable production systems, so I pushed to have the ML engineer title, as I feel it differentiated me, at least on paper, from someone who is only focused on model building. It also made applying for jobs easier- I only really focused on ML engineer positions as a lot of data scientist positions were too ambiguous for my liking.</p><p>For majority of the companies, to be a Machine Learning Engineer should be knowing ML techniques for your industry is important (CV, NLP, Recommendation Systems, Predictive Models, etc ) but you’ll also need some good software engineering knowledge. That typically (at least in my experience) means Python, AWS, SQL, docker, good testing methodologies, maybe some Java, and CI/CD basics. I was a software engineer for a couple of years before moving into a data scientist and that was incredibly valuable for me to become an ML engineer.</p><h3><strong>Conclusion</strong></h3><p>While there is some overlap, which is why some data scientists with backgrounds in software engineering move into machine learning engineering roles, data scientists focus on data analysis, business insights, and model prototyping, while machine learning engineers focus on coding and deploying complex, large-scale machine learning products.</p><p>If you found this helpful, please share it on Linkedin, Twitter, Facebook or any of your favorite forums.</p><p>Connect with me on <a href="https://linkedin.com/in/jayrodge">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=befa63bc1ce4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Magic of Thinking Big]]></title>
            <link>https://medium.com/@jayrodge/magic-of-thinking-big-bb2a1989981e?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb2a1989981e</guid>
            <category><![CDATA[positivity]]></category>
            <category><![CDATA[positive-thinking]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[thinking]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Wed, 13 Mar 2019 15:29:59 GMT</pubDate>
            <atom:updated>2020-03-05T15:14:51.692Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Magic of Thinking Big</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iFr9R3auWahUQYi1.jpg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplay.ht%2Farticles%2Fbb2a1989981e&amp;src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fmagic-of-thinking-big-bb2a1989981e&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/d75daefe377db489bb1330d0f17d934a/href">https://medium.com/media/d75daefe377db489bb1330d0f17d934a/href</a></iframe><p>I recently finished the book called “<strong>The Magic of Thinking Big</strong>” by <strong>David Schwartz</strong> and its one of the best books I have ever read. Here are my thoughts about the book.</p><p>According to David Schwartz, Whether your life goals are unbelievably large and intimidating or relatively small and achievable, you may have thought more than once, “Where do I start?”</p><p>The author suggests that you begin by creating an attitude in which you feel 100% able to achieve what you intend to do, or in other words, you should act like being one of the best.</p><p>Why is this going to work? Because once you begin to believe in yourself sufficiently, your brain creates the creativity required to achieve your objective. One McKinsey study cited in the book states that the drive to move forward is what management and social leaders seek most when working with people.</p><p>The author emphasizes working on your creative thinking abilities constantly. Your brain can evaluate and adapt to every situation, as it remains flexible.</p><p>He also suggests being in “Always Learning” mode, For example, if you work in a car dealer, it may seem useless to you to learn photoshop, but if it is fun, do it anyway. Take the “Who knows what’s good for?” mentality. You can easily use your new graphic design skills to create a bunch of great Facebook ads that can help you sell a lot more cars.</p><p>The second strategy that he suggests is to shut down your head’s negative voices. With the news reporting mainly on horrifying events and complaining only to everyone around you, negative thinking is the norm. You will find that nay-sayers are nearly always unsuccessful or average.</p><p>If you have an imposter syndrome or you don’t you are capable enough then this can be eliminated by writing a pep talk that reads like a commercial in which you try to sell yourself. Focus on what makes you different, e.g. you’re funny and always make people laugh at work. Read it loud and quiet once a day when you feel a little down.</p><p>No one is born confident, but everybody can excel at it. “Fake it until you make it ” is true in this case, because you can control your emotions in the way you feel. So sit down in the first row, get in touch with people and walk faster than anyone else.</p><p>Although the individual ideas discussed in the book are all well known today, I liked how the book rounded them all to one end, especially as the book is old. I could relate to quotes and ideas, for example, I’m a fast walker, and I’ve noticed that I feel more confident when I rush through all the slow people dragging their feet :).</p><p>The summary I have discussed covers a very small subset of the book, and it has a lot more information that I wasn’t able to cover. Therefore I recommend you give a read on this book and experience the changes that you could bring to yourself in order to excel at your work/studies by applying some small changes.</p><p>To know what I’m reading/What I’ve read, let’s connect on <a href="https://www.goodreads.com/user/show/81702738-jay-rodge">Goodreads</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb2a1989981e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Productivity Hack]]></title>
            <link>https://medium.com/@jayrodge/productivity-hack-10d7243c5?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d7243c5</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[control]]></category>
            <category><![CDATA[task-management]]></category>
            <category><![CDATA[tasks]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Wed, 13 Mar 2019 15:24:57 GMT</pubDate>
            <atom:updated>2019-03-13T15:24:57.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gZ8FbjAp6r6dUxLQ" /></figure><p>I have been reading a book called “<a href="https://www.amazon.com/Productivity-Project-Accomplishing-Managing-Attention/dp/1101904054/ref=asc_df_1101904054/?tag=hyprod-20&amp;linkCode=df0&amp;hvadid=312045580796&amp;hvpos=1o1&amp;hvnetw=g&amp;hvrand=3761366617237257287&amp;hvpone=&amp;hvptwo=&amp;hvqmt=&amp;hvdev=c&amp;hvdvcmdl=&amp;hvlocint=&amp;hvlocphy=9021721&amp;hvtargid=pla-401450758733&amp;psc=1&amp;tag=&amp;ref=&amp;adgrpid=60223809337&amp;hvpone=&amp;hvptwo=&amp;hvadid=312045580796&amp;hvpos=1o1&amp;hvnetw=g&amp;hvrand=3761366617237257287&amp;hvqmt=&amp;hvdev=c&amp;hvdvcmdl=&amp;hvlocint=&amp;hvlocphy=9021721&amp;hvtargid=pla-401450758733">The Productivity Project</a>” by Chris Bailey.</p><p>This book is about how to maximize your productivity and the author Chris Bailey has done a lot of experiments to demonstrate the results.</p><p>The one big and simple tip he suggested was to keep your to-do as short as possible, and the number of tasks he recommends is <strong>3</strong>.</p><p>Because creating a huge to-do list wouldn’t make sense as the chances of checking off all the tasks would be lower which could result in a feeling of failure at the end of the day.</p><p>On the other hand keeping only one task can eat up all your time and after completing the task, you may scroll mindlessly on your social network feeds.</p><p>Think about the situation being at the end of the day and thinking ‘What are important tasks if completed today will give a sense of relief and a good night sleep?” and add them on your to-do list.</p><p>I have been following this routine from a week now and the results are great, the sense of feeling that you get after completing those tasks is just awesome!</p><p>Therefore, by just following this simple hack/habit overtime will increase your productivity by a huge margin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d7243c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Text/Document Classification using PyText]]></title>
            <link>https://medium.com/hackernoon/text-document-classification-using-pytext-ca7e1c380d5f?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca7e1c380d5f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[pytext]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Sat, 09 Mar 2019 18:46:05 GMT</pubDate>
            <atom:updated>2019-08-06T14:51:02.751Z</atom:updated>
            <content:encoded><![CDATA[<p>Hands-on with Facebook’s newly open-sourced NLP library PyText based on PyTorch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLcN6Vlpa-PrxnRYJGnXDQ.png" /></figure><p>After releasing PyTorch 1.0, <a href="https://medium.com/u/25aae929dbb1">Facebook Research</a> recently open-sourced its Natural Language Modelling Framework based on PyTorch, PyText. It tries to bridge the gap between experimentation and rapid deployment/production, which was difficult with existing libraries.</p><p>PyText aims to achieve the following things:</p><ul><li>Make experimentation easy and fast</li><li>Reduce extra work when using pre-built models on new data</li><li>Define a clear path for researchers and engineers to build, test and deploy their models quickly</li><li>Ensure high performance</li></ul><p>PyText has a lot of support for rapid prototyping and is faster than other Natural Processing(NLP) Libraries available. Here’s a comparison of PyText with other NLP libraries:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PM1zDyVfL0LY0ZkUEETiQA.png" /><figcaption><a href="https://arxiv.org/abs/1810.07942">https://arxiv.org/abs/1810.07942</a></figcaption></figure><p>Facebook now uses PyText in their Portal which is a video calling service, and in their M suggestions feature in Messenger. The M suggestions feature generates more than a billion daily predictions, which shows its capability to operate at production level and still has low latency.</p><p>PyText is built on PyTorch, and it connects to ONNX and Caffe2. With PyText, AI researchers and engineers can convert PyTorch models to ONNX and then export them as Caffe2 for production deployment at scale.</p><p>PyText relies on the components displayed in the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O_hO7ol2HOVHnrhwFZ_WIA.png" /><figcaption><a href="https://code.fb.com/wp-content/uploads/2018/12/06_PyText_Flowchart_hero.png">https://code.fb.com/wp-content/uploads/2018/12/06_PyText_Flowchart_hero.png</a></figcaption></figure><p><strong>Task:</strong> combines various components required for a training or inference task into a pipeline. It can be configured as a JSON file that defines the parameters of all the child components. We’ll be discussing a sample config for a document classification task later in the post.</p><p><strong>Data Handler</strong>: processes raw input data and prepare batches of tensors to feed to the model.</p><p><strong>Model</strong>: defines the neural network architecture.</p><p><strong>Optimizer</strong>: encapsulates model parameter optimization using the loss from forward pass of the model.</p><p><strong>Metric Reporter</strong>: implements the relevant metric computation and reporting for the models.</p><p><strong>Trainer</strong>: uses the data handler, model, loss, and optimizer to train a model and perform model selection by validating against a holdout set.</p><p><strong>Predictor</strong>: uses the data handler and model for inference given a test dataset.</p><p><strong>Exporter</strong>: exports a trained PyTorch model to a Caffe2 graph using ONNX.</p><p>Let’s start with building a sentiment classifier using PyText, it’s simple!</p><p>To install PyText on your machine, enter the following on to your command line via pip:</p><pre>pip install pytext-nlp</pre><p>Before getting started let’s get the data right. Here, we will be using Amazon reviews which has positive and negative reviews for the various product and has 10000 total examples. <br>The PyText needs a .tsv(tab separated values, in the following fashion):</p><p>___label___ &#39;This is a Text&#39;</p><p>Here’s how our dataset(.tsv format) looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oneYNYdYtHGWOk9aPe6ozw.png" /><figcaption>Dataset</figcaption></figure><p>To define a model in PyText, it uses a configuration file (Task) which is in a .json format, where you can define your model.</p><p>Here’s a configuration file, where we are providing the training, validation and testing data, as well as other details like the number of epochs, batch size, and optimizer.</p><pre>{<br>  &quot;task&quot;: {<br>    &quot;DocClassificationTask&quot;: {<br>      &quot;data_handler&quot;: {<br>        &quot;train_path&quot;: &quot;data/train.tsv&quot;,<br>        &quot;eval_path&quot;: &quot;data/eval.tsv&quot;,<br>        &quot;test_path&quot;: &quot;data/test.tsv&quot;,<br>        &quot;train_batch_size&quot;: 128,<br>        &quot;eval_batch_size&quot;: 128,<br>        &quot;test_batch_size&quot;: 128</pre><pre>},<br>      &quot;trainer&quot;: {<br>        &quot;epochs&quot;: 20<br>      },<br>      &quot;optimizer&quot;:{<br>        &quot;lr&quot;: 0.001,<br>        &quot;type&quot;: &quot;adam&quot;,<br>        &quot;weight_decay&quot;: 0.000004<br>      }<br>    }<br>  }<br>}</pre><p>Now to train the model, just type on the command line as:</p><p>pytext train &lt; config.json</p><p>And boom, it should be training. By default, it uses a Bidirectional LSTM model and with 15 epochs, the model achieves around 83% which is good, considering data as we didn’t preprocess the text data.</p><p>PyText exports the model as Caffe2 object, to save the trained model:</p><p>pytext export --output-path model.c2 &lt; config.json</p><p>For predicting, we use a PyText predictor object which requires a saved model and the configuration file(.json). Here’s a small python script to predict the sentiment of a given Sentence/Text:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6699d630b7cc1121d04812695803e475/href">https://medium.com/media/6699d630b7cc1121d04812695803e475/href</a></iframe><p>The above four lines is what it takes to predict a review based on the previous model trained.</p><p>The predictor object predicts the sentiment, and the returns the probability of all the labels, the labels with the higher probability can be chosen as the answer.</p><h3>Conclusion</h3><p>This was a basic guide for learning about PyText and getting started with a basic classifier. I will be writing much more about PyText in the coming weeks, so make sure you follow me know more about PyText and its applications</p><p>GitHub Repo: <a href="https://github.com/jayrodge/PyText-Classifier">https://github.com/jayrodge/PyText-Classifier</a></p><p>If you found this helpful, please share it on Linkedin, Twitter, Facebook or any of your favorite forums.</p><p>Connect with me on <a href="https://linkedin.com/in/jayrodge">Linkedin</a>, <a href="https://about.me/jayrodge">about.me</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca7e1c380d5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/text-document-classification-using-pytext-ca7e1c380d5f">Text/Document Classification using PyText</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginners Guide for Data Science]]></title>
            <link>https://medium.com/hackernoon/beginners-guide-for-data-science-388a2ceab93d?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/388a2ceab93d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Sat, 05 Jan 2019 17:24:31 GMT</pubDate>
            <atom:updated>2020-02-03T18:58:54.073Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Beginner Guide to Data Science</strong></h3><h4>Curated list of Resources for Getting Started in Data Science and Deep Learning in 2020</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHTSc4n0UgOqHnuAk7M6CQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/CHt4BMi0-Is?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Henri L.</a> on <a href="https://unsplash.com/search/photos/data-analytics?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fbeginners-guide-for-data-science-388a2ceab93d&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2F388a2ceab93d&amp;image=https%3A%2F%2Fd262ilb51hltx0.cloudfront.net%2Ffit%2Fc%2F300%2F300%2F1%2AuFJpxpmmqUUyDdz5cnAi6g.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7a89f07b2da68c6e1054374ac30542a/href">https://medium.com/media/b7a89f07b2da68c6e1054374ac30542a/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fbeginners-guide-for-data-science-388a2ceab93d&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2F388a2ceab93d&amp;image=https%3A%2F%2Fd262ilb51hltx0.cloudfront.net%2Ffit%2Fc%2F300%2F300%2F1%2AuFJpxpmmqUUyDdz5cnAi6g.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7a89f07b2da68c6e1054374ac30542a/href">https://medium.com/media/b7a89f07b2da68c6e1054374ac30542a/href</a></iframe><p>Data Science is being adopted by almost all the companies right now whether it is a machinery business or automobiles.</p><p>According to <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=6&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwid2JPPlcXfAhUo9YMKHaIDC6EQFjAFegQICRAB&amp;url=https%3A%2F%2Fwww.forbes.com%2Fsites%2Flouiscolumbus%2F2018%2F01%2F29%2Fdata-scientist-is-the-best-job-in-america-according-glassdoors-2018-rankings%2F&amp;usg=AOvVaw2RDrP8iTYAsmd0V-ITRS0m">Glassdoor</a>, Data Scientist is the best job in America in 2018 with a median base salary of $110,000. However, there is also a huge skill gap for Data Science.</p><p>Becoming a Data Scientist is not that hard if given the right amount of time and effort while learning. However, I often find people trying out different courses, resources but still aren’t able to learn</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWCrOtVijQ8gqcEWKuWMBA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/1K9T5YiZ2WU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim Gouw</a> on <a href="https://unsplash.com/search/photos/machine-learning?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I have been doing Data Science from 2 years, and I tried several courses/resources, so here’s a list of recommendation for Getting Started in:</p><h3>Data Science</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*4pSHM94n-yOm4ZJ0HZlRXA.jpeg" /></figure><p>There are so many paid as well as free courses/MOOCs for getting started with Data Science, due to which choosing one becomes difficult.</p><p><strong>1. Applied Data Science with Python</strong></p><p>The Second best resource for getting started in Data Science is “<strong>Applied Data Science with Python</strong>” by Coursera.</p><p><a href="https://www.coursera.org/specializations/data-science-python">Applied Data Science with Python</a></p><p>This a specialization that contains <strong>4 courses</strong> which start with Python Basics, then learning Statistics required for Data Science.</p><p>Then it covers various Visualization techniques using libraries like matplotlib etc in Python, Fundamentals of Machine Learning, and in Final course, it covers basics of Natural Language Processing.</p><p>This specialization is free to access if you choose the ‘<em>Audit this course</em>’. However, for getting a certificate you would have to apply for <em>Financial Aid</em> or pay $50 subscription fee to coursera.</p><h3>Machine Learning</h3><p>The ‘<em>Applied Data Science with Python</em>’ from <em>coursera</em> covers Machine Learning in the specialization, however, if you want to deep dive into Machine Learning algorithms and the mathematics behind it, there’s another great free resource called as <a href="https://course.fast.ai/ml.html">fast.ai</a></p><p><a href="https://course.fast.ai/ml.html">Deep Learning For Coders-36 hours of lessons for free</a></p><p>This course is taught by an AI Researcher (Also, Ex-President Kaggle) <a href="https://en.wikipedia.org/wiki/Jeremy_Howard_(entrepreneur)"><strong>Jeremy Howard</strong></a> and is a part of a <a href="https://www.usfca.edu/arts-sciences/graduate-programs/data-science">Master of Science in Data Science</a> Program from University of San Francisco.</p><h3><strong>Deep Learning</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*nSQ16uPDxDJ__EjwPzha1g.jpeg" /></figure><p>Also, with Deep Learning there are so many courses available which teach you to apply deep learning algorithms and get State of the Art results within few lines of codes.</p><p>Applying these algorithms and getting results feels great, but one must know how they are working, instead of thinking of these algorithms as a black box.</p><ol><li><strong>Deep Learning Specialization</strong></li></ol><p>The specialization is taught by the great <strong>Andrew Ng.</strong></p><p><a href="https://www.coursera.org/specializations/deep-learning">Deep Learning</a></p><p>This course is targeted towards beginner and just requires knowledge of Basic Python, Linear Algebra and Calculus.</p><p>The algorithms are taught from scratch and it’s a resource for getting started with Deep Learning.</p><p>There’s a great review of this course by <a href="https://medium.com/u/dbc019e228f5">Daniel Bourke</a> on his YouTube channel, here’s the video if you’d like to see:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FICMtmjRg0-Y%3Fstart%3D120%26feature%3Doembed%26start%3D120&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DICMtmjRg0-Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FICMtmjRg0-Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a20168e38f38781ac4f72933906ebf2e/href">https://medium.com/media/a20168e38f38781ac4f72933906ebf2e/href</a></iframe><p><strong>2. fast.ai</strong></p><p><a href="https://course.fast.ai/index.html">Practical Deep Learning for Coders, v3 | fast.ai course v3</a></p><p>This is taught by <strong>Jeremy Howard(Ex-VP, Kaggle).</strong></p><p>This is the richest and comprehensive course for Deep Learning. It covers all aspects of Algorithms.</p><p>This course is taught with the help of <strong>fastai </strong>library which is a PyTorch wrapper, and it has a great community which will help you at every roadblock you face!</p><p><strong>3. Intro to Deep Learning with PyTorch</strong></p><p><a href="https://www.udacity.com/course/deep-learning-pytorch--ud188">Introduction to PyTorch | Deep Learning | Free Courses | Udacity</a></p><p>Recently, PyTorch 1.0 stable was released by Facebook, and it has ability to fully utilize your gpu power for training models since it works on a basic data structure Tensors.</p><p>Udacity partnered with Factbook launched the free Deep Learning course. They start from the basics of Neural Network and then goes to implementing various deep learning algorithms using PyTorch.</p><h3><strong>Miscellaneous Data Science Resources:</strong></h3><p>Apart from doing MOOCs you can always stay updated with the latest trends using the following links:</p><p><a href="https://hackernoon.com/data-science/home">Data Science in Tech - Hacker Noon</a></p><p><strong>Youtube</strong>:</p><ul><li><a href="https://www.youtube.com/channel/UCWN3xxRkmTPmbKwht9FuE5A">Siraj Raval</a></li><li><a href="https://www.youtube.com/lexfridman">Lex Fridman</a></li><li><a href="https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw">3Blue1Brown</a></li><li><a href="https://www.youtube.com/channel/UCr8O8l5cCX85Oem1d18EezQ">Daniel Bourke</a></li></ul><p><strong>Publications:</strong></p><ul><li><a href="https://towardsdatascience.com/">Towards Data Science</a></li><li><a href="https://becominghuman.ai">Becoming Human: Artificial Intelligence Magazine</a></li><li><a href="https://machinelearnings.co">Machine Learnings</a></li></ul><h4>Medium Publications</h4><ul><li><a href="https://medium.com/mlreview">ML Review</a></li><li><a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a></li><li><a href="https://medium.com/applied-data-science">Applied Data Science</a></li></ul><p><strong>Notes:</strong></p><p><a href="https://chrisalbon.com/">Chris Albon</a></p><p>Cheatsheets by <a href="https://medium.com/u/e8ec6fa4d7d4">Favio Vázquez</a>:</p><p><a href="https://github.com/FavioVazquez/ds-cheatsheets">GitHub - FavioVazquez/ds-cheatsheets: List of Data Science Cheatsheets to rule the world</a></p><p>Again, these are the recommendations. You can use any resources to get started in this field. And don’t just complete these MOOCs, develop some <strong>real-world project</strong> to test your skills by using the datasets available on <a href="http://kaggle.com">Kaggle</a> or by creating your own, because implementing them will give you an idea of how the tools and libraries work.</p><blockquote>Happy Learning!</blockquote><p><a href="https://hackernoon.com/data-science/home">Data Science in Tech - Hacker Noon</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=388a2ceab93d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/beginners-guide-for-data-science-388a2ceab93d">Beginners Guide for Data Science</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Binary Face Classifier using PyTorch]]></title>
            <link>https://medium.com/hackernoon/binary-face-classifier-using-pytorch-2d835ccb7816?source=rss-d4998a3bae22------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d835ccb7816</guid>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[image-classification]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Jay Rodge]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 19:39:28 GMT</pubDate>
            <atom:updated>2019-03-14T23:01:36.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Binary Image Classifier using PyTorch</h3><h3>Image classification using PyTorch for dummies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBnlM0161Zyx-akt3uEb8w.png" /><figcaption><a href="https://cdn-images-1.medium.com/max/2000/1*LLVL8xUiUOBE8WHgzAuY-Q.png">Source</a></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplay.ht%2Farticles%2F2d835ccb7816&amp;src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fbinary-face-classifier-using-pytorch-2d835ccb7816&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dbfc43f90165e1c7d0527c7709b17f1/href">https://medium.com/media/0dbfc43f90165e1c7d0527c7709b17f1/href</a></iframe><p>Facebook recently released its deep learning library called PyTorch 1.0 which is a stable version of the library and can be used in production level code.</p><p>I’m a part of Udacity’s PyTorch Scholarship Challenge program and learned a lot about PyTorch and its function. Coming from keras, PyTorch seems little different and requires time to get used to it.</p><p>In this article, I’ll be guiding you to build a binary image classifier from scratch using Convolutional Neural Network in PyTorch.</p><p>The whole process is divided into the following steps:</p><p>1. Load the data<br>2. Define a Convolutional Neural Network<br>3. Train the Model<br>4. Evaluate the Performance of our trained model on a dataset</p><h3><strong>1. Load the data</strong></h3><p>When comes to loading/ preprocessing the data PyTorch is much simpler as compared to other libraries. However, PyTorch has a built-in function called transforms using which you can perform all your pre-processing tasks all at once which we’ll see in a while.</p><p>For the dataset, I couldn’t find one with the faces as positive labelled, therefore I made my own dataset manually by using the images from <a href="http://vis-www.cs.umass.edu/lfw/">LFW Face Dataset </a>for positives and added some random images for the negatives which includes the images of vehicles, animals, furniture etc. <br>If you want, you can download the dataset from here: <a href="https://drive.google.com/file/d/1nt-Orxqh-5b1XwBcU3CHz4i0vEOGwt0J/view?usp=sharing">link</a></p><p>The data needs to be split in Train, Test and validation set before training. Train set will be used to train the model, validation set will be used for validating the model after each epoch, and the Test set will be used to evaluate the model once it is trained.</p><p>First, we need to get the dataset into the environment, which can be done by:<br>(<em>Note: ‘face’ is the name of the directory which contains a positive and negative example of faces</em>)</p><pre>train_data = datasets.ImageFolder(&#39;face&#39;,transform=transform)</pre><p>We’ll also need to define a transform object to perform the preprocessing steps. We can mention in the object what types of processing we need. In the following code, I have defined the transform object which performs Horizontal Flip, Random Rotation, convert image array into PyTorch (since the library only deals with Tensors, which is analogue of numpy array) and then finally normalize the image.</p><pre>transform = transforms.Compose([<br>    transforms.RandomHorizontalFlip(),<br>    transforms.RandomRotation(20),<br>    transforms.ToTensor(),<br>    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))<br>    ])</pre><p>Once we are done with the loading the dataset and defining transform object we can split the dataset into train, test and validation sets as discussed before. For carrying out splits:</p><pre>#For test<br>num_data = len(train_data)<br>indices_data = list(range(num_data))<br>np.random.shuffle(indices_data)<br>split_tt = int(np.floor(test_size * num_data))<br>train_idx, test_idx = indices_data[split_tt:], indices_data[:split_tt]</pre><pre>#For Valid<br>num_train = len(train_idx)<br>indices_train = list(range(num_train))<br>np.random.shuffle(indices_train)<br>split_tv = int(np.floor(valid_size * num_train))<br>train_idx, valid_idx = indices_train[split_tv:],indices_train[:split_tv]</pre><pre># define samplers for obtaining training and validation batches<br>train_sampler = SubsetRandomSampler(train_idx)<br>test_sampler = SubsetRandomSampler(test_idx)<br>valid_sampler = SubsetRandomSampler(valid_idx)</pre><pre>#Loaders contains the data in tuple format <br># (Image in form of tensor, label)<br>train_loader = torch.utils.data.DataLoader(train_data, batch_size=batch_size, sampler=train_sampler, num_workers=1)</pre><pre>valid_loader = torch.utils.data.DataLoader(train_data, batch_size=batch_size, sampler=valid_sampler, num_workers=1)</pre><pre>test_loader = torch.utils.data.DataLoader(train_data, sampler = test_sampler, batch_size=batch_size,num_workers=1)</pre><pre># variable representing classes of the images<br>classes = [0,1]</pre><p>The train_loader, test_loader and valid_loader will be used to pass the input to the model.</p><p>Here are some random images from the dataset after applying transformations which includes resizing, random rotation, Normalizing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*xydSVEV9sR4N2Idrhr6T7w.png" /></figure><h3><strong>2. Initialising the Convolutional Neural Network(CNN)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*pNxGdMXltxDBi3-j4BTPOw.jpeg" /></figure><p>The CNN in PyTorch is defined in the following way:</p><pre>torch.nn.Conv2D(Depth_of_input_image, Depth_of_filter, size_of_filter, padding, strides)</pre><p>Depth of the input image is generally 3 for RGB, and 1 for Grayscale. Depth of the filter is specified by the user which generally extracts the low level features, and the size of the filter is the size of the kernel which is convolved over the whole image.</p><p>To calculate the dimension of the new convolution layer, the following formula is used:<br><em>dimension=<br>(dimen_of_input_image- Filter_size(int)+(2*padding))/stride_value + 1</em></p><p>Now it’s time to initialise the model:</p><pre>class Net(nn.Module):<br>    def __init__(self):<br>        super(Net, self).__init__()<br>        # convolutional layer<br>        self.conv1 = nn.Conv2d(3, 16, 5)<br>        # max pooling layer<br>        self.pool = nn.MaxPool2d(2, 2)<br>        self.conv2 = nn.Conv2d(16, 32, 5)<br>        self.dropout = nn.Dropout(0.2)<br>        self.fc1 = nn.Linear(32*53*53, 256)<br>        self.fc2 = nn.Linear(256, 84)<br>        self.fc3 = nn.Linear(84, 2)<br>        self.softmax = nn.LogSoftmax(dim=1)<br>        <br>    def forward(self, x):<br>        # add sequence of convolutional and max pooling layers<br>        x = self.pool(F.relu(self.conv1(x)))<br>        x = self.pool(F.relu(self.conv2(x)))<br>        x = self.dropout(x)<br>        x = x.view(-1, 32 * 53 * 53)<br>        x = F.relu(self.fc1(x))<br>        x = self.dropout(F.relu(self.fc2(x)))<br>        x = self.softmax(self.fc3(x))<br>        return x</pre><pre># create a complete CNN<br>model = Net()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7Ecf5kbqm7GiGnvKHXoKA.png" /><figcaption>Model Architecture</figcaption></figure><p>We’ll also need to initialise our loss function and an optimizer. Loss Function will help us in calculating the loss by comparing the prediction and original label. The optimizer will minimize the loss by updating the parameters of the model after every epoch. They can be initialised by:</p><pre># Loss function<br>criterion = torch.nn.CrossEntropyLoss()</pre><pre># Optimizer<br>optimizer = torch.optim.SGD(model.parameters(), lr = 0.003, momentum= 0.9)</pre><h3><strong>3. Train the Model</strong></h3><p>It’s time to train the model!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*3tX5wuhfLPeinWsdEemi3Q.jpeg" /></figure><p>Training a model requires us to follow some steps which are:</p><ol><li><strong>Clear the gradients of all optimized variables:<br></strong>There could be gradients from previous batches, therefore it’s necessary to clear gradient after every epoch</li><li><strong>Forward pass</strong>: <br>This step computes the predicted outputs by passing inputs to the convolutional neural network model</li><li><strong>Calculate the loss:<br></strong>As the model trains, the loss function calculates the loss after every epoch and then it is used by the optimizer.</li><li><strong>Backward pass:</strong> <br>This step computes the gradient of the loss with respect to model parameters</li><li><strong>Optimization</strong><br>This performs a single optimization step/ parameter update for the model</li><li><strong>Update average training loss</strong></li></ol><p>Following is the code for training the model (<em>it’s for a single epoch</em>)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a211dd7b2248b1f23adb9ba7bc6f8d9/href">https://medium.com/media/6a211dd7b2248b1f23adb9ba7bc6f8d9/href</a></iframe><h3><strong>4. Model Evaluation</strong></h3><p>To evaluate the model, it should be changed from model.train() to model.eval()</p><pre>model.eval()<br># iterate over test data<br>len(test_loader)<br>for data, target in test_loader:<br>    # move tensors to GPU if CUDA is available<br>    if train_on_gpu:<br>        data, target = data.cuda(), target.cuda()<br>    # forward pass<br>    output = model(data)<br>    # calculate the batch loss<br>    loss = criterion(output, target)<br>    # update test loss <br>    test_loss += loss.item()*data.size(0)<br>    # convert output probabilities to predicted class<br>    _, pred = torch.max(output, 1)    <br>    # compare predictions to true label<br>    correct_tensor = pred.eq(target.data.view_as(pred))<br>    correct = np.squeeze(correct_tensor.numpy()) if not train_on_gpu else np.squeeze(correct_tensor.cpu().numpy())<br>    # calculate test accuracy for each object class<br>    for i in range(batch_size):       <br>        label = target.data[i]<br>        class_correct[label] += correct[i].item()<br>        class_total[label] += 1</pre><pre># average test loss<br>test_loss = test_loss/len(test_loader.dataset)<br>print(&#39;Test Loss: {:.6f}\n&#39;.format(test_loss))</pre><pre>for i in range(2):<br>    if class_total[i] &gt; 0:<br>        print(&#39;Test Accuracy of %5s: %2d%% (%2d/%2d)&#39; % (<br>            classes[i], 100 * class_correct[i] / class_total[i],<br>            np.sum(class_correct[i]), np.sum(class_total[i])))<br>    else:<br>        print(&#39;Test Accuracy of %5s: N/A (no training examples)&#39; % (classes[i]))</pre><pre>print(&#39;\nTest Accuracy (Overall): %2d%% (%2d/%2d)&#39; % (<br>    100. * np.sum(class_correct) / np.sum(class_total),<br>    np.sum(class_correct), np.sum(class_total)))</pre><p>After evaluation, we find the following result:</p><pre>Test Loss: 0.006558</pre><pre>Test Accuracy of     0: 99% (805/807) <br>Test Accuracy of     1: 98% (910/921)</pre><pre>Test Accuracy (Overall): 99% (1715/1728)</pre><p>The result that we got was using only 2 Convolutional Layers, though researchers are using deeper networks which can extract much more detailed features.</p><p>Since this model has learned to extract facial features, this can be furhter used for facial recognition, in which you could train this face classifier on your own images and create facial recognition system using transfer learning.</p><p>Also, editing few lines of code in this would generate another Image Classifier with right amount of data and labels. Possibilities are limitless, you just need to practice it and apply it on any problem you want!</p><blockquote>Happy Learning!</blockquote><p>GitHub Repo: <a href="https://github.com/jayrodge/Binary-Image-Classifier-PyTorch">https://github.com/jayrodge/Binary-Image-Classifier-PyTorch</a></p><p>Let’s connect on <a href="https://linkedin.com/in/jayrodge">LinkedIn!</a></p><p>Learn more <a href="https://about.me/jayrodge">about me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d835ccb7816" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/binary-face-classifier-using-pytorch-2d835ccb7816">Binary Face Classifier using PyTorch</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>