<?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 Heldenkombinat Technologies on Medium]]></title>
        <description><![CDATA[Stories by Heldenkombinat Technologies on Medium]]></description>
        <link>https://medium.com/@heldenkombinat?source=rss-af5aec43adf1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*cxukxOhTlD61CIJhmvxFOg.png</url>
            <title>Stories by Heldenkombinat Technologies on Medium</title>
            <link>https://medium.com/@heldenkombinat?source=rss-af5aec43adf1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 12:00:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@heldenkombinat/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[Strategy and Machine Learning]]></title>
            <link>https://medium.com/swlh/strategy-and-machine-learning-ad7ae47bcc19?source=rss-af5aec43adf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad7ae47bcc19</guid>
            <category><![CDATA[competitive-advantage]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[revenue-generation]]></category>
            <category><![CDATA[costs-reduction]]></category>
            <category><![CDATA[business-strategy]]></category>
            <dc:creator><![CDATA[Heldenkombinat Technologies]]></dc:creator>
            <pubDate>Mon, 04 May 2020 22:21:46 GMT</pubDate>
            <atom:updated>2020-05-13T22:19:45.576Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why you should integrate Machine Learning into your strategic thinking.</em></p><p>By <a href="https://www.linkedin.com/in/olaferichsen">Olaf Erichsen</a>.</p><p><em>Published in May 2020.</em></p><p>It is no surprise that Machine Learning (ML) has received considerably more attention in the last few years from media, consultants, executives, entrepreneurs, and investors. As with any disruptive technology, ML has triggered widespread experimentation in companies that has resulted in some really impressive applications. Unfortunately, many of such experiments are economically unsustainable, and adopting ML has no first-mover advantage per se. So, you may wonder, is it the right move to invest in this technology at this moment?</p><p>In fact, the key question is not whether to make use of ML technology or not, but how to deploy it in your organization. There is a strategic as well as a technical answer to this question and in the present analysis, I focus on the strategic part; leaving the technical answer to my Co-Founder <a href="https://www.linkedin.com/in/jorgedch">Dr. Jorge Davila-Chacon</a> in a follow-up article.</p><h4><strong>Machine Learning is changing your industry</strong></h4><p>To make sure we are all on the same page, let’s remember that ML, a subfield of Artificial Intelligence, designs software that learns to perform computational tasks from patterns in data instead of being explicitly programmed by humans. A couple of decades ago, companies started using <em>robotic hardware to scale manual</em> labor, and today, companies have started using <em>robotic software to scale mental labor</em>. ML aims to perform cognitive tasks in a faster, cheaper, or better way than human operators — and sometimes it can combine all three advantages.</p><p>As you are well aware, the use cases for ML are abundant: answering customer FAQs, extracting relevant information from documents or videos, predicting illnesses from medical images, and many other common applications. However, what you may have not heard as often, is that ML will have a more profound impact on your entire industry than just enabling a few use cases: it will reshape the way in which market forces interact with each other. In order to contextualize such impact and make it tangible to managers and executives, let’s take <a href="https://hbr.org/1979/03/how-competitive-forces-shape-strategy"><em>How competitive forces might shape and determine the profitability of an industry</em></a>, by Michael E. Porter, as a reference framework and update it to the context of ML. Even though multiple technological disruptors have emerged since Porter published this treatise in 1979, its scope is broad enough to remain relevant today (see also <a href="https://hbr.org/2001/03/strategy-and-the-internet"><em>Strategy and the Internet</em></a> (2001) by the same author).</p><blockquote>“ML will have a more profound impact on your entire industry than just enabling a few use cases: it will reshape the way in which market forces interact with each other”</blockquote><p>The <em>Five-Forces Framework</em> is a simple, yet powerful tool that helps you to visualize the dynamics of competitiveness in your industry’s ecosystem. It explains that competition is not only shaped by the rivalry between companies within a market, but also by the bargaining power of buyers and suppliers, and by the threat of substitutes and potential new entrants. Take a look at the following figure for a more detailed explanation of each force.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKvNnQIDq6aL1GG3OWShQA.png" /><figcaption>The<strong> <em>Five-Forces Framework</em></strong> (Michael E. Porter) applied to Machine Learning technology.</figcaption></figure><p>The scenarios described in the figure above are very general and only intended to get your thoughts started. Indeed, the dynamics between these forces are unique to each industry, meaning that the scenario for the airlines&#39; industry will look totally different from maritime shipping, advertising, or media publishing. Hence, as the figure explains, the potential advantages (+) and disadvantages (-) that ML could bring to your business need to be fine-tuned to the specifics of your industry’s ecosystem.</p><h4><strong>How to integrate Machine Learning in your strategy</strong></h4><p>Once you are aware of the potential changes that ML can bring to your market, you are better equipped to understand the position and the options of your company in the overall landscape. So, now you may wonder how exactly can you start integrating ML into your strategic planning?</p><blockquote>“your ML initiatives […] might only bring you minor benefits […] if they don’t support at least one of two broader value-propositions: <strong><em>generating new revenue streams </em></strong>and <strong><em>reducing costs</em></strong>”</blockquote><p>Building and deploying ML solutions in your organization will create costs and tie up your human and financial resources. Naturally, as this needs prioritization from your executives and the buy-in of other stakeholders, in every ML initiative you should focus on maximizing the economic value and the strategic impact at the same time. More concretely, directing your ML initiatives towards quality enhancements or process improvements might only bring you minor benefits and lose the prioritization game if they don’t support at least one of two broader value-propositions: <strong><em>generating new revenue streams </em></strong>and <strong><em>reducing costs</em></strong>.</p><p>You can create<em> </em><strong><em>new revenue streams </em></strong>by entering new markets. Firstly, by introducing a substitute that performs the same or similar functions as the incumbent competitor’s offerings, and secondly, by forward-integration into the buyer’s value chain — that is, by performing a subtask originally done by the buyer itself. In both cases, the product or service that generates new revenues needs to provide you with significant cost savings in order to compensate for the potential switching costs and to mitigate your buyer’s fear of giving away some of his core competencies.</p><p>In order to enable<strong><em> cost reductions</em></strong>, you should focus on productivity gains against your competitors, such as freeing skilled workers by automating preparatory or monotonous work, or on backward-integration — that is, to take over costly subtasks that were originally done by the suppliers.</p><blockquote>“focus on reducing the variable costs of your ML solution until they are only marginal to the overall costs of your entire offering. Otherwise, what can start as an impressive prototype simply will become a curiosity for showrooms”</blockquote><p>Lastly, keep in mind that ML solutions have <strong><em>variable costs</em></strong> that can be data-driven (e.g. when batch-processing <em>large volumes</em> of video via cloud servers) or time-driven (e.g. when providing <em>real-time</em> automated speech recognition for interaction with your customers). From both perspectives, the strategic as well as the operational, it is key to focus on reducing the variable costs of your ML solution until they are only marginal to the overall costs of your entire offering. Otherwise, what can start as an impressive prototype simply will become a curiosity for showrooms.</p><h4><strong>Take away</strong></h4><p>Since each industry is unique, there is no golden rule to determine the best use of ML in every business. Furthermore, ML is an abstract field that can be challenging to grasp. Nevertheless, you can start by investing in a conscious effort to educate yourself on this technology. Seek advice and understand where ML initiatives can give you a sustained impulse, by increasing or expanding the sources of profit in your business, and what your company should do to position itself in the best possible way within its ecosystem.</p><p>In summary, use ML to create <em>new revenue streams</em> (by entering new markets or forward-integration) or to <em>reduce costs</em> (by enabling productivity gains or backward-integration). Keep your focus on reducing the <em>variable costs</em> of your ML solution until they are just marginal to the overall costs of the product or service that you are offering.</p><p>Finally, but not less important, be aware that the strategic part is only one side of the coin in every ML discussion: case-by-case, without a sound understanding of the technical feasibility of ML proposals, the discussion is just a toothless tiger.</p><blockquote>Olaf Erichsen is Co-Founder and CEO of <a href="https://www.heldenkombinat.com/">Heldenkombinat Technologies</a>. You can reach him out via <a href="https://www.linkedin.com/in/olaferichsen">LinkedIn</a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad7ae47bcc19" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/strategy-and-machine-learning-ad7ae47bcc19">Strategy and Machine Learning</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image recognition with PyTorch on the Jetson Nano]]></title>
            <link>https://medium.com/@heldenkombinat/image-recognition-with-pytorch-on-the-jetson-nano-fd858a5686aa?source=rss-af5aec43adf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd858a5686aa</guid>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[jetson-nano]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Heldenkombinat Technologies]]></dc:creator>
            <pubDate>Wed, 22 May 2019 16:32:00 GMT</pubDate>
            <atom:updated>2019-05-24T08:32:04.300Z</atom:updated>
            <content:encoded><![CDATA[<p>Now that you’ve seen <a href="https://medium.com/@heldenkombinat/getting-started-with-the-jetson-nano-37af65a07aab">how to set up the Jetson Nano</a>, you are ready to run some deep learning models on it. In this post we’ll show you how to use pre-trained models, to train a model from scratch and to do transfer learning through the following steps:</p><ul><li><a href="#860d">Installing PyTorch and dependencies</a></li><li><a href="#60e8">Using a pre-trained model for image recognition</a></li><li><a href="#ea9a">Training a model from scratch</a></li><li><a href="#c173">Doing transfer-learning</a></li></ul><p>We will also compare the Jetson’s performance to both a desktop GPU and a CPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*cdq0tzONgmPd99WvxRRBeA.png" /></figure><h3>Prerequisites</h3><p>If you haven’t already, we recommend first going through <a href="https://medium.com/@heldenkombinat/getting-started-with-the-jetson-nano-37af65a07aab">our guide on setting up the Jetson Nano</a>. It’s important to run Jupyter Notebook through <a href="https://medium.com/@heldenkombinat/getting-started-with-the-jetson-nano-37af65a07aab#e40e">SSH</a> instead of using the browser on the Jetson. Furthermore, install all packages in a new virtual environment. This can prevent a lot of headaches later.</p><h4>Install PyTorch</h4><p>PyTorch can’t be directly installed with <a href="https://en.wikipedia.org/wiki/Pip_(package_manager)">pip</a> like on other architectures. Download the Jetson-specific version of PyTorch by running the wget command on your Jetson Nano:</p><pre>wget https://nvidia.box.com/shared/static/veo87trfaawj5pfwuqvhl6mzc5b55fbj.whl -O torch-1.1.0a0<strong>+</strong>b457266-cp36-cp36m-linux_aarch64.whl</pre><p>And install the wheel with:</p><pre>pip3 install numpy torch-1.1.0a0<strong>+</strong>b457266-cp36-cp36m-linux_aarch64.whl</pre><h4>Install pillow and matplotlib</h4><p>We’ll be using both <a href="https://pillow.readthedocs.io/en/stable/">pillow</a> and <a href="https://matplotlib.org/">matplotlib</a>, which require a few packages to be installed:</p><pre>sudo apt install libjpeg-dev libfreetype6-dev pkg-config libpng-dev<br>pip3 install matplotlib pillow<strong>==</strong>5.4.1</pre><p>We need version 5.4.1 of pillow to avoid a <a href="https://github.com/python-pillow/Pillow/issues/3769">known issue</a> with version 6.0.0.</p><h4>Install torchvision</h4><p>The <a href="https://pytorch.org/docs/stable/torchvision/index.html">torchvision</a> package consists of popular datasets, model architectures, and common image transformations for computer vision. It cannot be installed directly with pip, so let’s clone the repo in our environment folder, together with all the other packages. For my user name mircea and my environment called env, that path is /home/mircea/python-envs/env/lib/python3.6/site-packages. Run the following commands to install torchvision:</p><pre>cd /home/mircea/python-envs/env/lib/python3.6/site-packages<br>git clone https://github.com/pytorch/vision<br>cd vision<br>sudo python3 setup.py install<br>cd ~</pre><p>Don’t worry if the installation finishes with RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566). Torchvision will still work.</p><h3>Pre-trained Model</h3><p>Let’s use a pre-trained model from the <a href="https://pytorch.org/docs/stable/torchvision/models.html">torchvision model zoo</a> to classify images. Since PyTorch doesn’t provide class names for pre-trained models, we should first download them to make sense of the model’s output. Download the labels in your working folder by right-clicking on <a href="https://raw.githubusercontent.com/anishathalye/imagenet-simple-labels/master/imagenet-simple-labels.json">this link</a> and selecting “Save link as”.</p><p>In this example, we use a pre-trained <a href="https://arxiv.org/abs/1512.03385">ResNet50</a> model, but feel free to select a different one. We recommend sticking to ResNet models though, as they provide very good performance for a small memory footprint. This is achieved by replacing the final fully-connected layers (found in architectures such as <a href="https://arxiv.org/abs/1409.1556">VGG</a>) with <a href="https://alexisbcook.github.io/2017/global-average-pooling-layers-for-object-localization/">global average pooling</a>, which drastically reduces the number of parameters. We also tried using a VGG16 model but the larger model size caused the Jetson to swap continuously, which is not very good for the microSD card and can adversely impact performance.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e9791031c9e639cbcd5821e26032179/href">https://medium.com/media/6e9791031c9e639cbcd5821e26032179/href</a></iframe><pre>Predicted class is: Golden Retriever</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/188/1*XAdixBBKix2Yda8HtS0P8Q.png" /><figcaption>Looks like our model classified the image correctly!</figcaption></figure><h4>Benchmarking inference performance</h4><p>We can run the image through the model a number of times and determine the inference performance of our Jetson Nano. Before running the benchmark code I’ve rebooted the Nano and disabled swapping with swapoff -h, in order to remove the potential bottleneck that excessive swapping might cause. During benchmarking I&#39;ve monitored memory usage with top to make sure the Jetson is not running out of RAM.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5050dbb27c2afc59b583167846fbcfcf/href">https://medium.com/media/5050dbb27c2afc59b583167846fbcfcf/href</a></iframe><p>Let’s plot the performance with matplotlib.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98ed8b07df2ea5fecbf68ad62d64fc05/href">https://medium.com/media/98ed8b07df2ea5fecbf68ad62d64fc05/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*RQY4X7pR-oljlfwpKoPOyA.png" /><figcaption>ResNet50 inference performance on the Jetson Nano with a 224x224 image</figcaption></figure><p>We can see that after a few runs performance settles around 12 FPS. To put the Jetson’s performance into perspective, I ran the same benchmark on my computer as well, which has an <a href="https://www.amd.com/en/products/cpu/amd-ryzen-7-1700x">AMD Ryzen 1700x CPU</a> running at stock speed and an <a href="https://www.nvidia.com/en-us/geforce/graphics-cards/rtx-2070/">Nvidia RTX 2070 GPU</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*ipvifiTS9giyyV8ehRF63g.png" /><figcaption>Inference performance with ResNet50</figcaption></figure><p>In a surprising turn of events, the CPU managed to deliver 13 frames per second, while the 128 core GPU of the Jetson only managed 12. To be fair, the Jetson could not stretch its GPU muscles since we used a 2A power supply, and it achieved almost the same performance as the CPU while needing only 5W instead of 95W. But even so, this is only a third of the <a href="https://developer.nvidia.com/embedded/jetson-nano-dl-inference-benchmarks">36 FPS</a> figure that Nvidia found using TensorFlow. Running the benchmark in <a href="https://discuss.pytorch.org/t/inference-with-halftensor-for-speed-up/5739/4">half precision</a> did not improve things.</p><h3>Training a model from scratch</h3><p>With 4 GB RAM available, the Jetson Nano was never intended for training deep learning models from scratch. But we should remember that just five years ago a flagship <a href="https://www.geforce.com/hardware/desktop-gpus/geforce-gtx-980/specifications">GTX 980</a> also came with 4 GB RAM and it was perfectly acceptable to use for deep learning.</p><p>Can the Jetson Nano handle training a convolutional neural network from scratch? We will find out using the <a href="https://www.cs.toronto.edu/~kriz/cifar.html">CIFAR-10 dataset</a>. Since training from scratch requires a substantial amount of code, let’s use <a href="https://eu.udacity.com/course/deep-learning-nanodegree--nd101">Udacity</a>’s <a href="https://github.com/udacity/deep-learning-v2-pytorch/blob/master/convolutional-neural-networks/cifar-cnn/cifar10_cnn_augmentation.ipynb">notebook on CIFAR-10</a>. The entire repository is definitely worth cloning if you are just starting with PyTorch. Just remember that most of the notebooks are not going to run on the Jetson because of the limited memory. The CIFAR-10 notebook is an exception because the images are only 32x32 pixels in size.</p><p>Clone Udacity’s PyTorch repository with:</p><pre>git clone <a href="https://github.com/udacity/deep-learning-v2-pytorch.git">https://github.com/udacity/deep-learning-v2-pytorch.git</a></pre><p>Navigate to the notebook folder and start Jupyter notebook:</p><pre>cd deep-learning-v2-pytorch/convolutional-neural-networks/cifar-cnn/<br>jupyter notebook</pre><p>Open the cifar10_cnn_augmentation.ipynb notebook. Data augmentation is an important part of training computer vision models, as it can increase the variability in the training set and therefore prevent overfitting.</p><p>There is only one modification you need to make in order to run the notebook. Add the following two lines in the first code cell (just before import torch):</p><pre><strong>import</strong> sys<br>sys.path.insert(0, &#39;/home/mircea/python-envs/env/lib/python3.6/site-packages/vision&#39;)</pre><p>In the above, replace mircea with your user name and env with the name of your virtual environment. You can now run the entire notebook and be amazed at how a $99 device can be used for training a convolutional neural network from scratch on a dataset that is <a href="https://www.google.com/search?q=arxiv+cifar+10&amp;oq=arxiv+cifar+10&amp;aqs=chrome..69i57j69i64.2842j0j1&amp;sourceid=chrome&amp;ie=UTF-8">still used in research</a>.</p><h4>Benchmarking training performance</h4><p>Benchmarking the training performance revealed an even larger gap between the Jetson Nano and the CPU, although this can probably be attributed to the much slower read speeds of a microSD card compared to my NVMe SSD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*iYQeRfyXprxfZcCXMP4GnA.png" /><figcaption>Time required per epoch on CIFAR-10 with a batch size of 20</figcaption></figure><h3>Transfer-learning</h3><p>The fact that the Jetson Nano can train a CNN from scratch on the CIFAR-10 dataset is impressive. In the real world though, we would probably want to use higher resolution images, but training such a model from scratch would be overkill for our little Jetson Nano. What is there to do?</p><p>Transfer-learning allows us to use pre-trained models as feature extractors and only train the last fully connected layer. In this section, we will freeze all feature extraction layers of a ResNet18 model and create a new output layer that will learn to distinguish between ants and bees. The code is adapted from the <a href="https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html">PyTorch tutorial on transfer-learning</a>.</p><p>First download the data <a href="https://download.pytorch.org/tutorial/hymenoptera_data.zip">from here</a> and unzip it in the working directory on the Jetson. You can do it from the terminal with:</p><pre>wget https://download.pytorch.org/tutorial/hymenoptera_data.zip<br>unzip hymenoptera_data.zip</pre><p>This is a rather challenging problem since we only have about 200 training examples per class. As you will see though, transfer-learning and data augmentation will allow us to quickly train a well-performing model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8280901d3ba9526e4c59390809f818ea/href">https://medium.com/media/8280901d3ba9526e4c59390809f818ea/href</a></iframe><p>Let’s take a look at some of the pictures.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75792b00e2935ca2eabe44f8dadb9c12/href">https://medium.com/media/75792b00e2935ca2eabe44f8dadb9c12/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*LLDS5EIsmzi6wr7fesEFew.png" /><figcaption>Certainly not an easy task</figcaption></figure><p>Below we define the training function, tracking the validation accuracy and saving the best performing model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/747e2561e38d68077c094686100a0f3e/href">https://medium.com/media/747e2561e38d68077c094686100a0f3e/href</a></iframe><p>Now, for the actual transfer-learning part, we use a pre-trained ResNet18 as a feature extractor and replace its output layer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f5fbe2e91110cf93cd116cb652615d4/href">https://medium.com/media/2f5fbe2e91110cf93cd116cb652615d4/href</a></iframe><pre>Training complete in 2m 5s<br>Best val Acc: 0.960784</pre><p>In 2 minutes we were able to repurpose a pre-trained model for distinguishing between ants and bees with an accuracy of 96%. That’s really good!</p><h4>Benchmarking transfer-learning performance</h4><p>When it comes to transfer-learning performance, the Jetson Nano caught up with the CPU and delivered an average time per epoch of 12.6 seconds. Here we also read images from the disk during training, so it’s not clear why the Jetson took such a hit when training the network from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*zn2FLuy4C725BRTyjNfNWg.png" /><figcaption>The time required per epoch in transfer-learning</figcaption></figure><h3>A promising start</h3><p>Do not let the entry-level price and the small form factor deceive you. With a bit of care, the Jetson Nano is capable of amazing things. Let’s recap:</p><ul><li>We can easily do inference with a modern CNN architecture 50 layers deep.</li><li>We can train a shallow CNN from scratch on low-resolution images.</li><li>We can use transfer-learning to have the best of both worlds: high-resolution images and custom datasets.</li></ul><p>That’s quite incredible for a $99 device and it opens the door to a vast number of potential applications. Sure, the performance is lower than a CPU, but the mighty Jetson Nano wasn’t running at full power. Once we test it with a 4A power supply we’ll update our findings. And even today, two years after launch, this particular CPU is still <a href="https://www.newegg.com/Product/Product.aspx?Item=N82E16819113429&amp;Description=ryzen%201700x&amp;cm_re=ryzen_1700x-_-19-113-429-_-Product">almost twice as expensive as the Nano</a>. Once you start factoring in the additional cost of a motherboard, RAM, SSD/HDD, the true value of the Jetson Nano becomes apparent.</p><p>What do you plan to do with your Jetson Nano? Let us know in the comments below.</p><p>And of course, stay tuned for more deep learning tutorials!</p><blockquote>Mircea Stoica is a Machine Learning engineer at Heldenkombinat Technologies. He’s into deep learning and pizza. Follow him on <a href="https://twitter.com/thisismircea">Twitter</a>!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd858a5686aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with the Jetson Nano]]></title>
            <link>https://medium.com/@heldenkombinat/getting-started-with-the-jetson-nano-37af65a07aab?source=rss-af5aec43adf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/37af65a07aab</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[jetson-nano]]></category>
            <dc:creator><![CDATA[Heldenkombinat Technologies]]></dc:creator>
            <pubDate>Wed, 08 May 2019 10:59:53 GMT</pubDate>
            <atom:updated>2019-05-22T16:55:50.212Z</atom:updated>
            <content:encoded><![CDATA[<h3>Modern AI for everyone</h3><p>The Jetson Nano is the latest addition to Nvidia’s <a href="https://developer.nvidia.com/buy-jetson">Jetson line</a> of computing boards. These <a href="https://en.wikipedia.org/wiki/Single-board_computer">single-board computers</a> bring the power of GPUs to a small form factor with a low-power envelope, making them perfect for deep learning applications on embedded devices. You might notice a common trend browsing the <a href="https://developer.nvidia.com/embedded/learn/success-stories">Jetson success stories</a> that Nvidia showcases: they all come from companies. While this can be mostly justified by the large resources that companies can allocate to projects, at least part of the reason is that previous Jetsons were not particularly cheap. With prices ranging between $365 for the <a href="https://www.arrow.com/en/products/900-82180-0001-000/nvidia">Jetson TX1</a> and $1299 for the super powerful <a href="https://www.amazon.com/NVIDIA-Jetson-Xavier-Developer-945-82972-0000-000/dp/B07G5FCJQB/ref=sr_1_1?ie=UTF8&amp;qid=1536766274&amp;sr=8-1&amp;keywords=jetson+xavier">Jetson Xavier</a>, they weren’t very attractive for the DIY enthusiast crowd who might have longed for something like a Raspberry Pi with an entry-level Nvidia GPU. After all, if you have a few hundreds of dollars to spare, why not invest the money in a discrete desktop GPU?</p><p>The Jetson Nano is here to change all that. ARMed with a 1.4 GHz quad core Cortex A57 CPU, 4 GB RAM, and a 128 core <a href="https://en.wikipedia.org/wiki/Maxwell_(microarchitecture)">Maxwell GPU</a>, the tiny Jetson is ready to “<a href="https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-nano/">bring the power of modern AI to millions of devices</a>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*MHJznfSDMfqiPtI2zQ6p4A.png" /><figcaption>Deep learning inference for just 99$</figcaption></figure><p>While Nvidia provides <a href="https://developer.nvidia.com/embedded/community/jetson-projects">some cool demos</a> for the Jetson Nano, the goal of this series is to get you started with the two most popular deep learning frameworks: <a href="https://pytorch.org/">PyTorch</a> and <a href="https://www.tensorflow.org/">TensorFlow</a>.</p><h3>Contents</h3><p>Before we get to the actual deep learning part we will first go over the setup procedure for the Jetson Nano. In this post we’ll go through the following steps:</p><ul><li><a href="#4aed">Flashing the OS</a></li><li><a href="#f208">SSH control</a></li><li><a href="#4098">Creating a swap file</a></li><li><a href="#fa6e">Upgrading installed packages</a></li><li><a href="#d016">Installing pip</a></li><li><a href="#39f7">Using virtual environments</a></li><li><a href="#e40e">Setting up Jupyter Notebook</a></li></ul><h3>Setting up your Jetson Nano</h3><h4>Flash the OS and boot up</h4><p>The Jetson Nano runs an ARM-compatible version of Ubuntu 18.04 which you’ll have to flash to an SD card using your laptop or desktop. Consider that the Nano does not come with any dedicated storage — the SD card is all you’ll get. So make sure to use one that is large and fast! Follow <a href="https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit">Nvidia’s instructions</a> to get Ubuntu up and running on your mighty Jetson Nano.</p><p>Don’t worry if your SD card will appear to have a smaller size after flashing, it will be expanded to its maximum capacity in the first boot of the Nano. Speaking of its first boot, the setup sometimes appears to get stuck at “Applying changes” with the message “Waiting for unattended-upgr to exit”. It doesn’t always happen but if it does just have patience. Mine once took 25 minutes to complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4poLh39d9b23EJ3Du2TCeg.png" /><figcaption>Ready to deep learn!</figcaption></figure><h4>Control it through SSH</h4><p>Instead of working directly on the Jetson you could control it through SSH from your own computer, which is what we recommend. During the initial phase of setting everything up and installing libraries you might have to run commands following instructions you’re reading from some website, such as the one you’re currently on :) The <a href="https://en.wikipedia.org/wiki/Chromium_(web_browser">Chromium web browser</a> is installed by default but even a few tabs can be tough on the 4 GB RAM that the Nano comes with when installing some packages. Plus, working from your desktop or laptop probably feels more comfortable anyway.</p><p>You can use <a href="https://en.wikipedia.org/wiki/Secure_Shell">SSH</a> in Ubuntu, macOS, and Windows 10 (post the April 2018 update). To control the Jetson Nano through SSH you need to have it connected to the same local network through Ethernet or Wi-Fi.</p><ul><li>Find its network address by running ifconfig on the Jetson. The output should look something like below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*66RVF91V7ogapLoLfylrxQ.png" /><figcaption>In my case the Jetson’s IP address is listed under eth0 inet and is 192.168.1.70</figcaption></figure><ul><li>Run ssh mircea@192.168.1.70 on your desktop or laptop, where you replace mircea with your user name on the Nano, and 192.168.1.70 with the IP address that you found through ifconfig.</li><li>It will warn you that the authenticity of the host can’t be established. Type yes to continue, enter your Jetson Nano password, and you&#39;re in!</li></ul><p>Now that you can SSH in the Jetson from your own computer feel free to disconnect the monitor, keyboard, and mouse and free up some space on your desk!</p><p><strong>What to do if SSH stops working</strong></p><p>If you set up SSH and afterwards you reflash the SD card and restart everything from scratch, you’ll get an error message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-JJVuqJUEx1X5QLxyEEObA.png" /><figcaption>You’ll need to delete the old SSH key if you reflash the SD card</figcaption></figure><ul><li>If you’re using Ubuntu or macOS, simply run the suggested command</li></ul><pre>ssh-keygen -f &quot;/home/mircea/.ssh/known_hosts&quot; -R &quot;192.168.1.70&quot;</pre><p>where you replace mircea with your own user name and 192.168.1.70 with the IP address of your Jetson Nano. if using macOS adjust the path accordingly.</p><ul><li>If you’re using Windows, take note of the number shown at the end of the line starting with Offending ECDSA key in. In the Windows example above, that number is 3. Now edit the known_hosts file with:</li></ul><pre>notepad C:\\Users\\Mircea/.ssh/known_hosts</pre><p>where you replace C:\\Users\\Mircea/.ssh/known_hosts with the path you see in the error message. You can simply copy paste the path. Now delete the offending line shown in the error message and save the file. The line should contain the IP address of your Jetson.</p><h4>Create swap file</h4><p>With only 4 GB of RAM available, the Jetson Nano can become unresponsive if the memory gets filled up. To avoid that you can create a <a href="https://www.linux.com/news/all-about-linux-swap-space">swap file</a> that will at least keep it going while you clear things up. To create a 4 GB swap file run the following commands:</p><pre>sudo fallocate -l 4G /var/swapfile<br>sudo chmod 600 /var/swapfile<br>sudo mkswap /var/swapfile<br>sudo swapon /var/swapfile<br>sudo bash -c &#39;echo &quot;/var/swapfile swap swap defaults 0 0&quot; &gt;&gt; /etc/fstab&#39;</pre><p>/etc/fstab&#39; is part of the command above it and not a command on its own. To check that everything worked correctly run free -h. Swap should show 4,0G or whatever other size you&#39;ve chosen for the swap file.</p><h4>Upgrade software</h4><p>To ensure everything installed so far is up to date, first update your package list and then upgrade all installed packages with the commands:</p><pre>sudo apt-get update<br>sudo apt-get upgrade</pre><p>It’s a good idea to reboot the system with:</p><pre>sudo reboot</pre><h4>Install pip</h4><p>Python’s standard package installer <a href="https://en.wikipedia.org/wiki/Pip_(package_manager">pip</a> does not come pre-installed on the Jetson Nano. Install it with:</p><pre>sudo apt install python3-pip</pre><h4>Use virtual environments</h4><p>It’s considered best practice to use <a href="https://docs.python.org/3/tutorial/venv.html">virtual environments</a> for your Python programming needs. You might be familiar with <a href="https://docs.conda.io/en/latest/">conda</a>, but unfortunately it can’t be installed on ARM. Instead you can use the <a href="https://docs.python.org/3/library/venv.html">Python3-venv package</a> that can be installed with:</p><pre>sudo apt install -y python3-venv</pre><p>The following command will create a folder python-envs if it doesn&#39;t already exist, and a new virtual environment in /home/mircea/python-envs/env:</p><pre>python3 -m venv ~/python-envs/env</pre><p>To activate the environment run:</p><pre>source ~/python-envs/env/bin/activate</pre><p>The terminal shows you that the environment is active by displaying (env) before your user name. To deactivate the environment simply run deactivate.</p><p>Make sure you also install the <a href="https://pythonwheels.com/">wheel</a> package in every environment you create as it is required for the installation of many subsequent packages. Do this with:</p><pre>pip3 install wheel</pre><p>We recommend creating a new virtual environment for every major project you undertake. It allows you to install specific package versions and gives you the peace of mind that you can simply delete the environment and start again if something goes wrong. Much easier than going through the whole Jetson setup again.</p><h4>Setting up Jupyter Notebook</h4><p><a href="https://jupyter.org/">Jupyter Notebook</a> makes it easy to create and share documents that contain live code, equations, visualizations and formatted narrative text. It’s a great way to get started with Python if you’re not familiar with it already.</p><p>We recommend installing every package in a virtual environment, as described above. To install Jupyter notebook run:</p><pre>pip3 install jupyter</pre><p><strong>Jupyter Notebook through SSH</strong></p><p>We recommend using your own computer’s browser for accessing Jupyter notebooks on the Nano. Running the browser on the Jetson requires resources that would better be allocated to the actual deep learning part. To access the Jupyter server on the Jetson, we use SSH tunneling. The command for SSH tunneling works in Ubuntu, macOS, and Windows 10 (post the April 2018 update). Run it <strong>on your own desktop or laptop</strong> in a new terminal that <strong>you must leave open </strong>(alternatively exit the current SSH session by pressing Ctrl+D):</p><pre>ssh -L 8000:localhost:8888 mircea@192.168.1.70</pre><p>Of course replace the user name and IP address with your own. Now whatever is running on the Jetson Nano on port 8888 (the default for Jupyter Notebook) will be accessible on your own machine at port 8000. Use 8000 or above for local ports, since they are more likely to be available.</p><p>Start the Jupyter server on the Jetson with jupyter notebook, then go to <a href="http://localhost:8000/">http://localhost:8000</a> <strong>on your own computer</strong>. You should be greeted by a page with the Jupyter logo and a field that asks for a token or a password. You can <a href="https://jupyter-notebook.readthedocs.io/en/stable/public_server.html">read about how to use passwords</a> but for the sake of brevity we&#39;ll use tokens here. The token is all that comes after http://localhost:8888/?token=. Copy paste it in the browser and you should be good to go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*elznn8GyBer02Ql6yEIcVA.png" /><figcaption>The token is highlighted in green</figcaption></figure><h3>What next?</h3><p>Now that you have your Jetson Nano set up just the right way, we can get to the good stuff. Check out our <a href="https://medium.com/@heldenkombinat/image-recognition-with-pytorch-on-the-jetson-nano-fd858a5686aa">image recognition PyTorch tutorial</a>!</p><blockquote>Mircea Stoica is a Machine Learning engineer at Heldenkombinat Technologies. He’s into deep learning and pizza. Follow him on <a href="https://twitter.com/thisismircea">Twitter</a>!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37af65a07aab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cognitive Robotics with Jetson Nano from scratch]]></title>
            <link>https://medium.com/series/cognitive-robotics-with-jetson-nano-from-scratch-95719ec42d14?source=rss-af5aec43adf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/95719ec42d14</guid>
            <dc:creator><![CDATA[Heldenkombinat Technologies]]></dc:creator>
            <pubDate>Tue, 07 May 2019 21:10:22 GMT</pubDate>
            <atom:updated>2019-05-07T21:10:22.455Z</atom:updated>
            <content:encoded><![CDATA[<p>In these series, we will gently show you how to transform the Jetson Nano into a world-class robot brain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D18rQWWtVz1HQom28zR5Dw.png" /></figure><p>Not everything that works on your laptop works with the Nano. So, to start we will guide you through the basic configuration to be able to use the most common machine learning frameworks. We especially like to talk about the stuff that doesn’t work in practice and how to fix it.</p><p>Afterwards, we will keep posting about applications of machine learning for cognitive robotics. We love computer vision, audition and natural language processing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95719ec42d14" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>