<?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 Matt Kleinsmith on Medium]]></title>
        <description><![CDATA[Stories by Matt Kleinsmith on Medium]]></description>
        <link>https://medium.com/@matthewkleinsmith?source=rss-61d9e974ecf9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qeNt5spZ24bgqviuU-gFUA.png</url>
            <title>Stories by Matt Kleinsmith on Medium</title>
            <link>https://medium.com/@matthewkleinsmith?source=rss-61d9e974ecf9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 21:43:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@matthewkleinsmith/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[Headed Playwright with WSL]]></title>
            <link>https://medium.com/@matthewkleinsmith/headful-playwright-with-wsl-4bf697a44ecf?source=rss-61d9e974ecf9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bf697a44ecf</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[playwright-test]]></category>
            <dc:creator><![CDATA[Matt Kleinsmith]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 22:17:28 GMT</pubDate>
            <atom:updated>2023-02-26T21:58:52.123Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IcTL_wJnKCQH36QDKz9Jdw.png" /></figure><p>This is a quick guide to get Playwright’s Node.js package to work with Window’s WSL 2 for Ubuntu 22.04 <strong>in headed, GUI, visual mode</strong>. <strong>This will allow other GUI apps to work from WSL, too.</strong></p><p>(Note: If you just want GUI Playwright + Windows, no WSL, you can install Node and Playwright on Windows directly.)</p><p>Before doing the steps in this article, this was my experience when running npm run test :</p><h3>Before:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*NCsTtmhyWVwBZLoGhHq6Wg.png" /><figcaption>Failure</figcaption></figure><h3>After:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*ZRcevfM9AB2BvB0HCWmcRA.png" /><figcaption>Success</figcaption></figure><p>Below is a fast series of steps to make it work. Afterward, there are links to deepen one’s understanding.</p><h3>The actual steps I took:</h3><p>1. Have an already existing Node.js Playwright project.</p><p>2. Ensure your system packages are up to date:</p><pre>sudo apt update<br>sudo apt upgrade</pre><p>3. Run npm run test and see it fail.</p><p>4. Install the Ubuntu packages that Playwright headful mode asks for when it fails to run.</p><p>5. Install these, too (<a href="https://scottspence.com/posts/gui-with-wsl#gui-things">source</a>):</p><pre>sudo apt install libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libgstreamer-plugins-bad1.0-0 gstreamer1.0-libav -y</pre><p>6. Download and install <a href="https://sourceforge.net/projects/vcxsrv/">VcXsrc</a>:</p><ul><li>If necessary, launch program manually: C:\Program Files\VcXsrv\xlaunch.exe</li><li>Choose default settings (“Multiple windows”, “Start no client”, etc.)</li><li>Checkmark “Disable access control”</li><li>Checkmark “Public networks, such as those in airports and coffee shops”</li></ul><p>7. Put the following in ~/.bashrc:</p><pre>export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk &#39;{print $2; exit;}&#39;):0.0<br>sudo /etc/init.d/dbus start &amp;&gt; /dev/null</pre><p>8. Reload .bashrc. In a terminal, enter:</p><pre>source ~/.bashrc</pre><p>9. Allow passwordless access to dbus:</p><ul><li>In a terminal, enter:</li></ul><pre>sudo visudo -f /etc/sudoers.d/dbus</pre><ul><li>In the nano file, enter:</li></ul><pre>&lt;your_username&gt; ALL = (root) NOPASSWD: /etc/init.d/dbus</pre><ul><li>&lt;your_username&gt; is your username. It’s the text before “@” in your terminal. Or type in a terminal: whoami</li><li>To save, press CTRL + X, then press Y, then press Enter.</li></ul><p>10. Run npx playwright testin Playwright project and see it work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*ZRcevfM9AB2BvB0HCWmcRA.png" /><figcaption>Success</figcaption></figure><p>Note: On PC restart, we’ll need to start XLaunch again. We can automate that, though.</p><h3>Credits and deeper understanding:</h3><p>To understand more about why each of the steps were necessary, see these two source materials:</p><p>From 2019: <a href="https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress">https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress</a></p><p>The above was missing some packages that the below mentioned.</p><p>From 2020: <a href="https://scottspence.com/posts/gui-with-wsl">https://scottspence.com/posts/gui-with-wsl</a></p><h3>Shout-out:</h3><p>Shout-out to <a href="https://www.qawolf.com/">QA Wolf</a> for inspiring me to figure out how to get GUIs to work with WSL, by giving me a take home assessment that required it. I am not affiliated with QA Wolf beyond that, but hopefully I will be.</p><h3>If these steps didn’t work for you,</h3><p>Please message me on LinkedIn: <a href="https://www.linkedin.com/in/matthewkleinsmith/">https://www.linkedin.com/in/matthewkleinsmith/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bf697a44ecf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Starry Night CNN Visualizations]]></title>
            <link>https://medium.com/@matthewkleinsmith/starry-night-vgg-visualizations-15332a7d7db6?source=rss-61d9e974ecf9------2</link>
            <guid isPermaLink="false">https://medium.com/p/15332a7d7db6</guid>
            <dc:creator><![CDATA[Matt Kleinsmith]]></dc:creator>
            <pubDate>Mon, 06 Mar 2017 05:48:46 GMT</pubDate>
            <atom:updated>2017-03-28T13:37:35.890Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m using this post as a photo album. There are no explanations in it.</p><p>If you’re interested in visualizing CNN activations I suggest these links:</p><p><strong>Video:</strong></p><p><a href="https://www.youtube.com/watch?v=AgkfIQ4IGaM">https://www.youtube.com/watch?v=AgkfIQ4IGaM</a></p><p><strong>Code:</strong></p><p><a href="https://github.com/yosinski/deep-visualization-toolbox">https://github.com/yosinski/deep-visualization-toolbox</a></p><p><strong>Write up:</strong></p><p><a href="http://yosinski.com/deepvis">http://yosinski.com/deepvis</a></p><h3>Input (three color channels)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0x1DO9hcB2lHQORYfeVO8A.png" /></figure><h3>A portion of the final layer (40 out of 512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOggOY0GIxZJ_BSWZxWQhw.png" /></figure><h3>block1_conv1 (64 filters) (first conv layer)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*45TuUJ0SBY2d3dkTCGT8BQ.png" /></figure><h3>block1_conv2 (64 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7SeELOtRy1ISqJQyFIqDQ.png" /></figure><h3>block1_pool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3qBE6PAM_fQ3S8OsbHWVw.png" /></figure><h3>block2_conv1 (128 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaL3HYdkbKuyLVnzu4B7Dg.png" /></figure><h3>block2_conv2 (128 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtyHvxfq0fO2T-I4J4wwuw.png" /></figure><h3>block2_pool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulTIAYo7qaJq4ZuhDB20gA.png" /></figure><h3>block3_conv1 (256 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6y4VlonMuoj1RfPnXwdYgQ.png" /></figure><h3>block3_conv2 (256 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWdwUTiFhOHytbctpW8UHA.png" /></figure><h3>block3_conv3 (256 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwMFeFEBtcb-RE0OWlT_WQ.png" /></figure><h3>block3_pool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXpD_fgy6-vgLDdKXihHIw.png" /></figure><h3>block4_conv1 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WsrRFz3lGyYPGrl6EEE9rA.png" /></figure><h3>block4_conv2 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZhJ_pZkoomytJCrORwo7kg.png" /></figure><h3>block4_conv3 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bb9CIiGxqYYS2PyUSC1pQ.png" /></figure><h3>block4_pool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E2VdNupLi9EmWas1ZPP2tw.png" /></figure><h3>block5_conv1 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yg0DJc28oinc-w4TptZ2kg.png" /></figure><h3>block5_conv2 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wS8d8t_BtH_8Es1FJ2Ffg.png" /></figure><h3>block5_conv3 (512 filters)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OkFKJubWf4oM1lmn36_P6Q.png" /></figure><h3>block5_pool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w0ER47CpKLQak1r9NeD_Xw.png" /></figure><h3>Zoomed in block5_pool (top left corner)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOggOY0GIxZJ_BSWZxWQhw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15332a7d7db6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CNNs from different viewpoints]]></title>
            <link>https://medium.com/impactai/cnns-from-different-viewpoints-fab7f52d159c?source=rss-61d9e974ecf9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fab7f52d159c</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Matt Kleinsmith]]></dc:creator>
            <pubDate>Fri, 10 Feb 2017 22:40:38 GMT</pubDate>
            <atom:updated>2017-04-20T16:11:12.572Z</atom:updated>
            <content:encoded><![CDATA[<h4>Prerequisite: Basic neural networks</h4><h4>The theme of this post</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4UPp3Tc4A32S0WXJ0pWP7g.jpeg" /></figure><h4>The<strong> image</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/75/1*7zVtk9Xb3X6aQScJqxCUYw.png" /></figure><h4>The filter</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/51/1*aCBPCSInHE6vFaECSAT5oA.png" /></figure><h4>Since the filter fits in the image four times, we have four results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/53/1*I8BERkXPnVjdVCawr7Q23A.png" /></figure><h4>Here’s how we applied the filter to each section of the image to yield each result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*s-TmnXo69mAKbnMoMBnpMg.png" /></figure><h4>The equation view</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*-TnNZ4srYItcGXov-dTmmw.png" /></figure><p>Notice that the bias term, b, is the same for each section of the image. You can consider the bias as part of the filter, just like the weights (α, β, γ, δ) are part of the filter.</p><h4>The compact equation view</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*3IbCXOa7zllJHhJrvueG9Q.png" /></figure><h4>The neural network view</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*Pirh_aXJwGLbOsENeMNHrA.png" /></figure><h4>The matrix multiplication view</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*95lL-PY5WEeBAtfaWAIIRQ.png" /></figure><p>The matrix above is a weight matrix, just like the ones from traditional neural networks. However, this weight matrix has two special properties:</p><ol><li>The zeros shown in gray are untrainable. This means that they’ll stay zero throughout the optimization process.</li><li>Some of the weights are equal, and while they are trainable (i.e. changeable), they must remain equal. These are called “shared weights”.</li></ol><p>The zeros correspond to the pixels that the filter didn’t touch. Each row of the weight matrix corresponds to one application of the filter.</p><h4>The dense neural network view</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*jrGLWytdCPiVjrU8i4XHPg.png" /></figure><p>The gray connections correspond to the untrainable zeros. This graph is the same as the previous graph, except that it shows the untrainable zeros. This view helped me see the connection between traditional neural networks and CNNs.</p><h4>A familiar diagram</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*jGIAbxQ_jlPO7gi8xnDOxg.png" /></figure><h4>How did I learn this?</h4><ol><li><a href="http://course.fast.ai/">Jeremy Howard’s deep learning course</a>, especially <a href="https://github.com/fastai/courses/blob/master/deeplearning1/excel/conv-example.xlsx">his CNN spreadsheet</a> and <a href="https://www.youtube.com/watch?v=V2h3IOBDvrA">the corresponding video</a> (0:00 to 14:00)</li><li><a href="http://neuralnetworksanddeeplearning.com/">Michael Nielsen’s deep learning book</a>, especially <a href="http://neuralnetworksanddeeplearning.com/chap1.html">chapter 1 (NNs)</a> and <a href="http://neuralnetworksanddeeplearning.com/chap6.html">chapter 6 (CNNs)</a></li></ol><p>I found out about Michael Nielsen’s book from <a href="http://wiki.fast.ai/index.php/Lesson_2">Jeremy’s suggested readings for NNs</a> and <a href="http://wiki.fast.ai/index.php/Lesson_3#CNN_review">readings for CNNs</a>.</p><h4>Bonus: Preserving the image size with zero-padding and a 3x3 filter</h4><p>Notice that we went from a 3x3 image to a 2x2 image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*X904PMeB5iq-r8sfRpf2LA.png" /></figure><p>With zero-padding and a 3x3 filter, we can preserve the image size.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*d2zKv2LzHmmgWXK-MDFewQ.png" /></figure><p>Here’s what zero-padding with a 3x3 filter looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*m8oHuCZMBK6gghLXr1bY8Q.png" /></figure><p>The 3x3 filter allows us to center the filter on each pixel, so that each original pixel corresponds to a pixel in the result. Although, without zero-padding, our filter would get stuck in the corners, unable to center on any pixel except pixel E, and the result would be a 1x1 image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*wIDWlaOiGQQBqBtIObPobg.png" /></figure><h4>Important things that I didn’t talk about or diagram</h4><ul><li>Activation functions</li><li>Pooling</li><li>Multiple filters</li><li>Multiple convolutional layers</li><li>Dense layers (without shared weights or untrainable zeros)</li><li>The output layer</li><li>The optimization process (i.e. gradient descent via backpropagation)</li><li><a href="http://course.fast.ai/lessons/lesson1.html">How to do useful things with CNNs</a></li></ul><h4>Important views I didn’t show</h4><ul><li>Code views (e.g. a Python view or a Keras view)</li><li><a href="http://setosa.io/ev/image-kernels/">Realistic views</a> (i.e. with real images)</li><li>Many-filter views (<a href="http://cs231n.github.io/understanding-cnn/">here</a> and <a href="https://i.stack.imgur.com/Hl2H6.png">here</a>)</li><li>Interactive views (<a href="https://github.com/fastai/courses/blob/master/deeplearning1/excel/conv-example.xlsx">here</a> and <a href="http://setosa.io/ev/image-kernels/">here</a>)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fab7f52d159c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/impactai/cnns-from-different-viewpoints-fab7f52d159c">CNNs from different viewpoints</a> was originally published in <a href="https://medium.com/impactai">ImpactAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>