<?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 Devin Platt on Medium]]></title>
        <description><![CDATA[Stories by Devin Platt on Medium]]></description>
        <link>https://medium.com/@devinplatt?source=rss-7f2027937c10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XqINOW4L81w4enSl.jpg</url>
            <title>Stories by Devin Platt on Medium</title>
            <link>https://medium.com/@devinplatt?source=rss-7f2027937c10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:25:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devinplatt/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[Is a Vegan Diet Healthier?]]></title>
            <link>https://medium.com/@devinplatt/is-a-vegan-diet-actually-healthier-7a8d6c4eee73?source=rss-7f2027937c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a8d6c4eee73</guid>
            <category><![CDATA[vegetarian]]></category>
            <category><![CDATA[vegan]]></category>
            <category><![CDATA[diet]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[food]]></category>
            <dc:creator><![CDATA[Devin Platt]]></dc:creator>
            <pubDate>Thu, 15 Nov 2018 19:59:28 GMT</pubDate>
            <atom:updated>2019-03-27T23:32:23.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q81MAg8_I6MkEUuUCpneyA.jpeg" /></figure><p><em>TL;DR: whether you’re a vegan or an omnivore, you can have a healthy or unhealthy diet. Studies show that vegetarians and vegans tend to be healthier than their meat-eating counterparts, as a group. Having a restricted diet means you have to try harder to get certain nutrients, but vegetarians and vegans also don’t eat some bad stuff by default.</em></p><p>For my <a href="https://www.wikiclaim.org/">wiki project</a> I’m taking requests for questions to research. A friend recently told me he’d <strong>“like to see arguments about whether a vegan diet is actually healthier.”</strong> The friend is a vegetarian, so I didn’t know if he wanted me to compare the vegan diet to vegetarian or omnivorous diets. I decided to look at both.</p><p>For this piece I reviewed 4 pages on Wikipedia, a <a href="https://www.economist.com/briefing/2018/10/13/why-people-in-rich-countries-are-eating-more-vegan-food">recent piece in the Economist</a>, and a year-old <a href="https://www.nytimes.com/2017/10/02/well/eat/good-vegan-bad-vegan.html">piece from the New York Times</a>. I reviewed the primary and secondary sources linked to by these articles as well.</p><h3><strong>Are Vegan Diets Healthy?</strong></h3><p>Yes, if done right. <a href="https://www.wikiclaim.org/index.php?title=A_well-planned,_balanced_vegetarian_diet_is_suitable_to_meet_all_recommendations_for_nutrients_in_every_stage_of_human_life"><strong>A well-planned, balanced vegan diet is suitable to meet all recommendations for nutrients in every stage of human life</strong></a><strong>.</strong></p><p>Vegans need to make sure they get enough vitamin B12. It’s plentiful in meat, and present in dairy, but less easily found in vegetables. Studies show B12 deficiency as one of the <a href="https://www.wikiclaim.org/index.php?title=Improperly_planned_vegetarian_diets_may_be_deficient_in_vitamin_B12">biggest challenges</a> for vegans and vegetarians. It is possible for vegans to get enough B12 by eating the right foods and maybe taking supplements (and some packaged foods are supplemented too).</p><p>Vitamin B12 seems to be the most agreed upon deficiency in vegetarian diets. Other deficiencies are mentioned in diet literature, but aren’t as definite.</p><h3><strong>Are There Health Benefits to a Vegetarian Diet?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0fJsFm0_I_YC3Gj1GQEQw.jpeg" /></figure><p>According to a <a href="https://www.economist.com/briefing/2018/10/13/why-people-in-rich-countries-are-eating-more-vegan-food">recent article in the Economist</a>, “The direct evidence that vegan and vegetarian diets are in themselves good for people is mixed.”</p><p><a href="https://www.wikiclaim.org/index.php?title=Vegetarians_as_a_group_are_healthier_than_omnivores"><strong>A number of studies show that vegetarians and vegans are healthier than their omnivorous counterparts</strong></a>, but the Economist contends that there are confounding variables like “eating more varied diets, and, perhaps crucially, fewer calories overall”. So there’s a definite correlation, but apparently no strong body of scientific evidence of a causal relationship (proving causation ain’t always easy!).</p><p>That said, <a href="https://en.wikipedia.org/wiki/Red_meat#Hazards">studies do indicate</a> health risks of eating red meat, particularly processed meats. For more, see: <a href="https://www.wikiclaim.org/index.php?title=A_vegetarian_diet_is_healthier_than_an_omnivorous_one">A vegetarian diet is healthier than an omnivorous one</a>?</p><h3><strong>Are There Health Benefits of a Vegan Diet over Vegetarian?</strong></h3><p>It was hard for me to find any scientific material online about health benefits of going vegan over vegetarian. (Kandarp, I’m sorry.)</p><p>One <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4245565/">2014 study</a> even laments:</p><blockquote>“Very few studies rigorously evaluate and compare omnivorous, vegetarian and vegan subjects as distinct experimental groups. It is thus difficult to discern whether the health advantages attributed to vegans could be generalized to all vegetarians or even to moderate meat eaters following a healthy diet.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZzkvIc5QjbdmeXAyN8Nukg.jpeg" /><figcaption>Vegan food from a <a href="http://www.mindfulfarmers.org/">Mindful Farm</a> in Thailand</figcaption></figure><p>Going from vegetarian to vegan basically means cutting dairy (and eggs, if you eat them) out of your diet. Cutting dairy could reduce extra calories if you eat lots of cream or fatty cheese, but it could also reduce protein intake if you don’t replace it with high protein vegan foods.</p><p>Also, dairy is a source of vitamin B12, which is plentiful in some meats but difficult for vegetarians and vegans to get.</p><h3><strong>Conclusions</strong></h3><p>At least for me, it’s not news to hear that eating vegetables is good for you and that lots of people eat statistically unhealthy amounts red meat and processed meats. I did learn that <a href="https://www.wikiclaim.org/index.php?title=Vegetarians_as_a_group_are_healthier_than_omnivores"><strong>studies show that statistically vegetarians tend to be healthier than their meat-eating counterparts</strong></a><strong>. </strong>Also, I learned greater detail about the specific nutritional challenges to being vegetarian or vegan.</p><p>Personally, I think the best arguments for 100% vegetarianism and veganism are probably the ethical ones. The health benefits of vegetarian and vegan diets don’t require 100% adherence, and probably offer decreasing marginal returns. The question only asked about health though so I’m not covering ethics today.</p><p>Finally, I’m looking for more topics and questions to research and write up. Leave a comment if there’s something you like me to cover!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a8d6c4eee73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Addiction to Artwork]]></title>
            <link>https://medium.com/st-francis-challenge/from-addiction-to-artwork-5bab0d4682dd?source=rss-7f2027937c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bab0d4682dd</guid>
            <category><![CDATA[san-francisco]]></category>
            <category><![CDATA[addiction]]></category>
            <category><![CDATA[social-justice]]></category>
            <category><![CDATA[homelessness]]></category>
            <dc:creator><![CDATA[Devin Platt]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 00:19:40 GMT</pubDate>
            <atom:updated>2018-06-17T00:19:40.419Z</atom:updated>
            <content:encoded><![CDATA[<h4>Drug addiction led Brian to homelessness. But artwork helped bring him back.</h4><p><em>Part of a series meant to share the stories of real San Franciscans and their experiences with homelessness.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s20OXpymUxUePXdv." /><figcaption>Brian Bourassa</figcaption></figure><p>The <a href="http://hospitalityhouse.org/community-arts/">Hospitality House Community Art Center</a> sits on Market and Sixth, on the same block with the Flying Falafel and that chai place everyone raves about. It’s a place I’ve passed by so many times, but I never knew what it was or took a moment to find out.</p><p>Until now.</p><p>We entered the Art Center and signed in at reception. There was a healthy turnout of artists working on different projects: ceramics, painting, silkscreen, and more. The Art Center is a non-profit. Though it’s popular with the homeless and inhabitants of SRO’s, it’s open to anybody, and all the supplies are free.</p><p>Our subject, Brian, warmly greeted us. We made our way to the back of the Center, to a small corner near some supply shelves where we could conduct the interview without bothering the artists at their work.</p><h3><strong>Becoming Homeless</strong></h3><blockquote><strong><em>“It brought me down very quickly. In about a 3 year period it brought me down.”</em></strong></blockquote><p>Brian is a formerly homeless San Franciscan. He had been a commercial property manager for many years, and was a successful hair stylist. But drug addiction changed that. “I just had a problem with crystal meth, and it basically brought me down very quickly. In about a 3 year period it brought me down.”</p><p>Brian was homeless for 4 years, from 2010 to 2014. His first 3 years were more of a drug-induced haze, but the last year he began to turn his life around.</p><h3><strong>Finding Stability</strong></h3><blockquote>“That wasn’t really offered to me. I had to kinda come up with that.”</blockquote><p>For Brian there were no formal programs for transitional housing. He had to find his own informally through a church and other services. In his own words, “That wasn’t really offered to me. I had to kinda come up with that.”</p><blockquote>“I was part of a group of people who stayed at the Dolores church. We slept up on the steps and in the archways, and we had an arrangement with the church, with an individual who ran the church, that as long as we kept quiet at night and in the morning we were up and out by 7 o’clock, he would let us stay there.</blockquote><blockquote>I nicknamed us the Dolores Dollies [laughs]”</blockquote><p>Brian stayed at the Dolores church for over half a year, until he finally got off of the street. But the church only provided a place to sleep. Brian also got a storage unit so he had a place to keep his things.</p><blockquote><strong><em>“I’m gonna get up, I’m gonna take my stuff to storage, and I’m gonna come to the Art Center.”</em></strong></blockquote><p>He also developed a routine. The Community Art Center was key to this. “I was slowly pulling my stress levels down, and I was getting better rest because I knew that, “I’m gonna get up, I’m gonna take my stuff to storage, and I’m gonna come to the art center” and I can sit here for 5 hours and Zen out and do art.”</p><h3><strong>Finding a Community</strong></h3><blockquote><strong><em>“The self-doubt is really hard. You need a lot of support.”</em></strong></blockquote><p>Brian found a community to support him through the <a href="http://sfaf.org/">San Francisco Aids Foundation</a>. He attended support groups there. Eventually at one meeting a good friend turned to him and said, “I think you’re ready to get off the street.” The friend helped Brian get a bed at Acceptance Place.</p><blockquote>“It took someone else telling me telling me ‘I think you’re ready’, because the self-doubt is really hard. You need a lot of support system. You need a lot of people building up, believing in you.”</blockquote><h3><strong>Lessons</strong></h3><blockquote><strong><em>“The more stability you can offer somebody, the greater chances they have of staying off the street.”</em></strong></blockquote><p>Brian believes that a lot of homeless people are in transition. “They’re just in transition, and they’re lost and they don’t know what to do, and why not help them through that transition? Why not give them something stable?”</p><p>Creating a stability is key to helping that transition. “There’s PTSD you’re dealing with from being on the street, or the reasons you went to the street in the first place. The more stability you can offer somebody, the greater chances they have of staying off the street in the long run.”</p><p>People need somewhere safe to sleep, a safe place to keep their belongings, a community to encourage them, and a routine that helps them transition back to a normal lifestyle.</p><p>Although there are lots of resources for homeless people today, they tend to focus on individual needs: a bed, a meal, and so on. Brian thinks that this approach is inadequate for helping people to get out of the cycle of homelessness. “It’s almost like they keep people in place.”</p><p>This is why Brian supports efforts to create Safe Organized Spaces (SOS) that help reacquaint the homeless with the routines of a stable everyday life.</p><p><em>Since you’re reading this article, you’re probably concerned about homelessness issues in San Francisco. You may be wondering, “How can I help?”</em></p><p>Saint Francis has a petition advocating for Safe Organized Spaces on public/private land as alternatives to sidewalk encampments, which you can sign at<a href="http://www.safeorganizedspaces.org/"> http://www.safeorganizedspaces.org/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*bbsvkOD35Zj1yHCN." /><figcaption>Providing transitional communities for the homeless requires political will. Your signature DOES make a difference.</figcaption></figure><p>Consider also sharing this article or the petition. You can “clap” for this article to give it more visibility. Thanks!</p><p>If you’re interested in reading future articles, follow Saint Francis on Medium and social media for updates</p><ul><li><a href="https://medium.com/st-francis-challenge">https://medium.com/st-francis-challenge</a></li><li><a href="https://www.facebook.com/saintfrancischallenge/">https://www.facebook.com/saintfrancischallenge/</a></li><li><a href="https://twitter.com/SFHChallenge">https://twitter.com/SFHChallenge</a></li><li><a href="https://www.instagram.com/saintfrancischallenge/">https://www.instagram.com/saintfrancischallenge/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bab0d4682dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/st-francis-challenge/from-addiction-to-artwork-5bab0d4682dd">From Addiction to Artwork</a> was originally published in <a href="https://medium.com/st-francis-challenge">St Francis Challenge</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“There really needs to be a manual for this”]]></title>
            <link>https://medium.com/st-francis-challenge/there-really-needs-to-be-a-manual-for-this-a344061cee9d?source=rss-7f2027937c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/a344061cee9d</guid>
            <category><![CDATA[san-francisco]]></category>
            <category><![CDATA[lgbtq]]></category>
            <category><![CDATA[social-justice]]></category>
            <category><![CDATA[homelessness]]></category>
            <category><![CDATA[human-rights]]></category>
            <dc:creator><![CDATA[Devin Platt]]></dc:creator>
            <pubDate>Mon, 07 May 2018 02:41:17 GMT</pubDate>
            <atom:updated>2018-05-25T18:07:29.483Z</atom:updated>
            <content:encoded><![CDATA[<h4>Michael Rouppet was evicted and homeless overnight. Here’s his story.</h4><p><em>Part of a series meant to share the stories of real San Franciscans and their experiences with homelessness.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*gkDjxJYp9UQDaS4r." /><figcaption>A mural at Balmy Alley (CC Franco Folini)</figcaption></figure><p>We arrived at Balmy Alley in San Francisco’s Mission District, painted ground-to-roof with vividly colorful murals. Upon ringing the doorbell, we were greeted warmly by Michael Rouppet, who invited us into the living room, asked us to take a seat, and offered coffee.</p><p>Michael lives at a cooperative house run by <a href="http://www.mpahc.org/">Marty’s Place</a>, an organization providing housing for low-income people living with HIV/AIDS in San Francisco. He’s also the organization’s president.</p><p>A Bay Area native, he moved into a rent-controlled flat near Alamo Square in the early ’90s. In 2012, after nearly two decades as an active member of the neighborhood, a new landlord <a href="http://sfaf.org/hiv-info/hot-topics/from-the-experts/unexpected-journey.html">hastily evicted him</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0q8Dee-fDobv2MXU." /><figcaption>Michael Rouppet</figcaption></figure><h3>An Eye-Opening experience</h3><blockquote><strong><em>“I remember my first day, and I thought, there really needs to be a manual for this.”</em></strong></blockquote><p>Michael was drawn to a lot of things about San Francisco, but never thought he’d see it from the street level. “I remember my first day, and I thought, there really needs to be a manual for this. I’ve gone to school, I’ve lived abroad, I speak several languages, I consider myself fairly educated, I vote, I engage with people in the community, and I’ve always had the presumption that I’d never experience homelessness.”</p><p>Michael realized at that moment that he had a lot to learn about being homeless<strong>. </strong>“Your key to survival was dependent on learning, or unlearning everything you thought you knew about life, and relearning a whole new way of survival that’s completely depending on the charity of other people.”</p><blockquote><strong><em>“I’ve come out of the closet in my life 4 times. Homelessness was unlike any other.”</em></strong></blockquote><p>Michael learned first hand the stigma attached to homelessness. “I’ve come out of the closet in my life 4 times”, he says. As gay, as HIV positive, and when he got hepatitis C. Yet coming out as homeless was the hardest. “Homelessness out of all coming outs — that was so compounded by stigma and ignorance — and it was unlike any other coming out that I’ve ever gone through.”</p><h3>Support, Advocacy, and Marty’s Place</h3><p>Michael relied on numerous services while he was homeless. Services for food, lockers, showers, medicine, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*Tu_upk4r5zCiyhnlLZ6JJQ.jpeg" /></figure><p>Most important to him was the San Francisco Aids Foundation (SFAF), which provided not only material support, but a community. They supported him and then he started volunteering for them himself through their Syringe Access Services. He also participated with the foundation’s <a href="http://www.sfaf.org/client-services/positive-force/">Positive Force</a> program and the <a href="http://www.stonewallsf.org/">Stonewall Project</a>.</p><p>In 2015, Michael raised over $3,600 for HIV services on the AIDS/LifeCycle and rode 545-miles on a mountain bike from San Francisco to Los Angeles. Later that year he learned about <a href="http://www.mpahc.org/about-us/">Marty’s Place</a> and was extended an offer to live there, ending his nearly 3 years of homelessness.</p><p>Rouppet continues extensive advocacy with the SFAF, Marty’s Place, and other programs.</p><h3>Lessons</h3><blockquote><strong><em>“When you’re homeless your security is hemorrhaged in every aspect. You’re completely dependent on the charity of other people.”</em></strong></blockquote><p>Michael sees stigma as an obstacle to progress because it prevents people from seeing reality for what it is. In a city where 35% of the homeless population is African American, and 30% identify as LGBT, “We don’t honestly address the <em>-isms</em> that people are fighting about now.”</p><blockquote>“In a city that I look at as more forward-thinking compared to a lot of places in the country, I’m so disappointed that we still can’t get it right because there’s a certain level of tone-deafness to real problems.”</blockquote><p>Michael is also critical of <a href="http://www.sfexaminer.com/sf-expanding-program-bused-10k-homeless-residents-town-past-decade/">out-of-town programs</a>, which bus homeless residents out of San Francisco, even though 70% of homeless people in San Francisco are <em>from</em> San Francisco.</p><p>Michael was able to access services and transition back to a stable living situation off the streets. He recognizes how important those services are: “When you’re homeless your security is hemorrhaged in every aspect. You’re completely dependent on the charity of other people.” However, he also is very critical about how they could be improved. Services are “silo’d” into separate groups that don’t always communicate with each other and may be situated far apart.</p><p>One key element of Michael’s transition was the stability that a supportive community and regular routines afforded him. While many individual services exists, programs to specifically provide stable transitions to normal routines and home living are especially lacking. This is why Michael supports efforts to create Safe Organized Spaces (SOS) that help reacquaint the homeless with the routines of a stable everyday life.</p><p><em>Since you’re reading this article, you’re probably concerned about homelessness issues in San Francisco. You may be wondering, “How can I help?”</em></p><p>Saint Francis has a petition advocating for Safe Organized Spaces on public/private land as alternatives to sidewalk encampments, which you can sign at <a href="http://www.safeorganizedspaces.org/">http://www.safeorganizedspaces.org/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jnyoi37jKuS8mdbkeDVh2w.png" /><figcaption>Providing transitional communities for the homeless requires political will. Your signature DOES make a difference.</figcaption></figure><p>Consider also sharing this article or the petition. You can also “clap” for this article to give it more visibility. Thanks!</p><p>If you’re interested in reading future articles, follow Saint Francis on Medium or other social media for updates</p><ul><li><a href="https://www.facebook.com/saintfrancischallenge/">https://www.facebook.com/saintfrancischallenge/</a></li><li><a href="https://twitter.com/SFHChallenge">https://twitter.com/SFHChallenge</a></li><li><a href="https://www.instagram.com/saintfrancischallenge/">https://www.instagram.com/saintfrancischallenge/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a344061cee9d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/st-francis-challenge/there-really-needs-to-be-a-manual-for-this-a344061cee9d">“There really needs to be a manual for this”</a> was originally published in <a href="https://medium.com/st-francis-challenge">St Francis Challenge</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Training Wavenet with TensorFlow on AWS]]></title>
            <link>https://medium.com/@devinplatt/training-wavenet-with-tensorflow-on-aws-b0e2adeb204b?source=rss-7f2027937c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0e2adeb204b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[wavenet]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Devin Platt]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 01:09:34 GMT</pubDate>
            <atom:updated>2017-01-28T20:39:07.036Z</atom:updated>
            <content:encoded><![CDATA[<p>This post gives step-by-step instructions on how to train a Wavenet model with TensorFlow on AWS. It borrows from both <a href="http://cs231n.github.io/aws-tutorial/">Karpathy’s AWS tutorial</a> (for AWS setup) and <a href="https://medium.com/@giltamari/tensorflow-getting-started-gpu-installation-on-ec2-9b9915d95d6f#.hn3d05ece">this Medium post</a> (for TensorBoard and Jupyter setup). It uses the <a href="https://github.com/ibab/tensorflow-wavenet">tensorflow-wavenet</a> repository from Github. See <a href="https://deepmind.com/blog/wavenet-generative-model-raw-audio/">Deepmind’s original post</a> for more information about Wavenet.</p><h3>AWS Setup</h3><p>I will assume that you have some AWS experience, but I will try to link to the appropriate resources for how to use AWS.</p><p>If you wish to save your trained models, you should first set up an <a href="https://aws.amazon.com/documentation/s3/">S3 bucket</a> to upload files to. Open the EC2 dashboard of the AWS console, and click “launch instance” (if you don’t know how to do this, see <a href="http://cs231n.github.io/aws-tutorial/">Karpathy’s tutorial</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DCX5tgP8Yg8icMTJ." /></figure><p>We will use the <a href="https://aws.amazon.com/marketplace/pp/B01M0AXXQB">AWS Deep Learning AMI</a>, so click on the “AWS Marketplace” tab, search for “Deep Learning AMI”, and select the top result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*08j4gebl37sQ-wsn." /></figure><p>Next select an instance with a GPU. For example, a p2.xlarge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hotoQdPdnMof3HMX." /></figure><p>Note that a p2.xlarge costs ~$.9 / hour. See <a href="https://aws.amazon.com/ec2/pricing/">here</a> for Amazon’s EC2 pricing. For the purposes of this tutorial, you can use an on-demand instance (the default). If you end up using AWS often for machine learning tasks, it is <a href="https://www.reddit.com/r/MachineLearning/comments/3tlrmk/deep_learning_on_aws_anyone_trying_it/cx795k4/">recommended</a> to use <a href="https://aws.amazon.com/ec2/spot/pricing/">spot instances</a> with frequent model backups to S3 to save a lot of money (a spot instance p2.xlarge costs ~$.16 / hour). Anyways, click “Next: Configure Instance Details”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UkIeqvUTjbYwHNUQ." /></figure><p>If you want to provide the machine access to your S3 bucket, add your IAM role (if you don’t have an IAM role, “click create a new IAM role”) . Then, click “Next: Add Storage”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UQDR6PsFsmNUOVm3." /></figure><p>The default drive has 30GB of storage. This should be fine for training a basic Wavenet network on a small amount of audio data, but if you want to train on a larger dataset, choose a larger EBS volume. Then, click “Next: Add Tags”, and then click “Next: Configure Security Group”.</p><p>Search Google for “my ip address” to get your IP address, then in the SSH rule replace 0.0.0.0/0 with your IP address (so that the whole world does not have SSH access to your machine). Also add Custom TCP Rules for ports 8888 and 6006 on your IP address (these will allow you to navigate to the TensorBoard and Jupyter Notebook dashboards in your browser, as explained in <a href="https://medium.com/@giltamari/tensorflow-getting-started-gpu-installation-on-ec2-9b9915d95d6f#.hn3d05ece">this Medium post</a>). Note that if you ever have issue accessing the machine, you can try changing the “Source” to “0.0.0.0/0“ and see if the issue is whitelisting the wrong IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E1U_QjvVLObBqQDJ." /></figure><p>Click “Review and Launch”. Then click “Launch”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AnmSJXBbWOgGFTKL." /></figure><p>Use an existing key pair, or create a new one and download it. You’ll need to change permissions to the key as explained in <a href="http://cs231n.github.io/aws-tutorial/">Karpathy’s tutorial</a>:</p><pre>chmod 600 PEM_FILENAME</pre><p>Click “Launch Instances”. Now your instance is launching. Navigate to the EC2 console instances tab (click on “View Instances”), and identify the IP address of your instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tXJXaH_IatzqHde_." /></figure><p>Once you instance finishes launching (it passes 2/2 status checks), you can ssh into the machine.</p><pre>ssh -i PEM_FILENAME ec2-user@PUBLIC_IP</pre><p>Note that the username is crucial. For AMIs with Ubuntu installed (like in Karpathy’s tutorial) the user is “ubuntu”, but for the Amazon Deep Learning AMI the operating system is Amazon’s version of Red Hat Enterprise Linux, which uses the user “ec2-user”.</p><p>Congrats, your EC2 GPU machine is running!</p><h3>Software Setup</h3><p>Next let’s prepare the machine to run Wavenet (in the future I might create an AMI with all dependencies installed, but for now here are the instructions). Grab the setup.sh file from <a href="https://github.com/devinplatt/aws-tensorflow-wavenet">https://github.com/devinplatt/aws-tensorflow-wavenet</a> and run it.</p><pre>sudo env PATH=$PATH env HOME=$HOME ./setup.sh</pre><p>To secure your Jupyter Notebook you will be prompted for a password and for some openssl information (which you can mainly leave blank).</p><h3>Training a Wavenet Model</h3><p>We keep our task simple: we shall train our model to generate sound learned from a single audio file downloaded from YouTube, with no local or global conditioning.</p><h3>Download Training Data</h3><p>We create a data directory and use youtube-dl to download an audio file of 4 hours of piano music:</p><pre>mkdir -p ~/data/wavenet_corpus<br>cd ~/data/wavenet_corpus<br>youtube-dl --extract-audio --audio-format wav <a href="https://www.youtube.com/watch?v=EhO_MrRfftU">https://www.youtube.com/watch?v=EhO_MrRfftU</a></pre><h3>Train the Model</h3><h3>Aside: Terminal Multiplexing</h3><p><a href="https://en.wikipedia.org/wiki/Terminal_multiplexer">Terminal multiplexing</a> is essential here to make sure that training doesn’t end when you exit your ssh session. I prefer to use tmux for multiplexing. With tmux you start a session by running</p><pre>tmux</pre><p>You can exit tmux anytime by pressing the command prefix (ctrl-b) and then “d”. To re-enter the existing session, run</p><pre>tmux attach</pre><p>In tmux you can create additional terminal windows using prefix+c (create). You can navigate them by using prefix+n (next), and prefix+p (previous). You can even name them using prefix+, (comma, I guess since “n” is already taken).</p><h3>Start Training</h3><p>Create a new tmux window and name it (eg. “train”). Then start training:</p><pre>cd ~/src/tensorflow-wavenet<br>python train.py --data_dir=/home/ec2-user/data/wavenet_corpus</pre><h3>Monitor Training</h3><p>Create a new tmux window and name it (eg. “tensorboard”). Then launch TensorBoard:</p><pre>tensorboard --logdir=/home/ec2-user/src/tensorflow-wavenet/logdir</pre><p>Now navigate your web browser to</p><p><a href="http://public_ip:6006/">http://PUBLIC_IP:6006</a></p><p>Note that this must be HTTP, not HTTPS.</p><h3>Generate Audio</h3><p>Use the <a href="https://github.com/ibab/tensorflow-wavenet/blob/master/generate.py">generate.py</a> file to generate output. Example code below:</p><pre># 16000 is 1 second (so 160000 is 10 seconds)<br>python generate.py --wav_out_path=generated.wav --save_every 2000 --samples 160000 /home/ec2-user/src/tensorflow-wavenet/logdir/train/2017–01–15T07–05–36/model.ckpt-12400</pre><p>The generated output can be listened to on TensorBoard (in theory; it doesn’t seem to be working for me), or in a Jupyter Notebook.</p><h3>Start a Notebook Server</h3><p>Open a window in your terminal multiplexer, then launch the jupyter notebook server:</p><pre>cd ~/notebooks<br>jupyter notebook --certfile=~/certs/mycert.pem --keyfile ~/certs/mycert.key</pre><p>Now navigate your web browser to</p><p><a href="https://public_ip:8888/">https://PUBLIC_IP:8888</a></p><p>Note that the address MUST use HTTPS, not HTTP. Also, Google Chrome will complain about the connection not being secure. Ignore the warning, and press “Advanced” to proceed to your password protected login.</p><p>Now on the Jupyter page start a Notebook and run the following Python code:</p><pre>audio_fname = &#39;/home/ec2-user/src/tensorflow-wavenet/generated.wav&#39;<br>import IPython<br>IPython.display.Audio(audio_fname)</pre><p>You can also download the wav files directly from the notebook.</p><h3>Save a model in S3 for Later</h3><p>If you associated your instance with an IAM role, you can save a model to S3. For example:</p><pre>aws s3 cp --recursive /home/ec2-user/src/tensorflow-wavenet/logdir/train/2017–01–15T07–05–36 s3://my-bucket/tensorflow/models/tensorflow-wavenet/logdir/train/2017–01–15T07–05–36/</pre><p>The tensorflow-wavenet code can restore from these checkpoints. Note that the <a href="https://github.com/ibab/tensorflow-wavenet/blob/master/wavenet_params.json">wavenet_params.json</a> file must have the same parameters as it had during the original training for this to work. So you should probably save the wavenet_params.json file too:</p><pre>aws s3 cp /home/ec2-user/src/wavenet-tensorflow/wavenet_params.json s3://my-bucket/tensorflow/models/tensorflow-wavenet/logdir/train/2017–01–15T07–05–36/</pre><h3>Load a Pre-trained Model</h3><p>You can use code similar to below to load a pre-trained model:</p><pre>cd /home/ec2-user/src/tensorflow-wavenet<br>mkdir -p logdir/train/2017–01–15T07–05–36/<br>aws s3 cp --recursive s3://my-bucket/tensorflow/models/tensorflow-wavenet/logdir/train/2017–01–15T07–05–36/ logdir/train/2017–01–19T07–05–36/<br>cp logdir/train/2017–01–19T07–05–36/wavenet_params.json .</pre><p>Training picks up where it left off:</p><pre>python train.py --data_dir=/home/ec2-user/data/wavenet_corpus — logdir logdir/train/2017–01–15T07–05–36/</pre><h3>Next Steps</h3><p>Currently, the output my models have been generating is pretty noisy. Although the piano sounds <a href="https://deepmind.com/blog/wavenet-generative-model-raw-audio/">generated by deepmind</a> sound clear, my generated outputs contain cracklings and some static in addition to meaningful audio. I’d like to experiment with training the model longer, using different model parameters (eg. to increase the model’s receptive field), training datasets, and maybe even some changes to the model architecture to try and achieve deepmind-like quality. If I can increase the quality I’ll post a follow-up with the techniques needed to do so.</p><p>I might also create a derivative AMI from the AWS Deep Learning AMI with some of my extra dependencies installed, and post some Soundcloud links to some model output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0e2adeb204b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>