SlideShare a Scribd company logo
1 of 34
A Whirlwind Tour of
Recurrent Neural Networks
Sarah Sexton
Microsoft, Chicago
Software Engineer
@Saelia
Love building new things...?
@Saelia
...but hate thinking of a new name?
@Saelia
Thinking of a video game genre is easy...
Run and train RNN
To Run
To pull or run Sarah’s pre-trained Docker snapshot to avoid waiting 8 hours, type:
docker pull saelia/rnn-js
To Train
The way to actually make the RNN generate new Shakespeare text is with the data
sampling script:
th sample.lua -gpu -1 -checkpoint cv/checkpoint_12900.t7 -length 150 -temperature .7
GPU: Setting the flag gpu to -1 tells the code to train using CPU; otherwise it defaults to
GPU 0.
Checkpoints: While the model is training, it will periodically write checkpoint files to
the cv folder. The frequency with which these checkpoints are written is controlled by the
number of iterations, specified with the eval_val_every option. (E.g., if this is 1, then a
checkpoint is written every iteration.)
Length: An important flag is -length. 100 would generate a body of text 100 characters in
length. The default is 2000.
Temperature: An important parameter you may want to play with is -temperature, which
takes a number in range (0 to 1, 0 not included), default = 1. Lower temperature will cause
the model to make more “likely” but more boring and conservative predictions. Higher
temperatures cause the model to take more chances and increase diversity of results, but
at a cost of more mistakes.
@Saelia
@Saelia
Learn:
• Docker experience
• RNN knowledge
• Great names by AI
@Saelia
X1
X2
Y
A1
A2
A3
A4
B1
B2
B3
B4
Input layer Output layerHidden layers
Superheroes Designed by Neural Network
Speet Stank
Red Fart
Mister Man
Rad Food
Sapgirl
Woop
Ann Man
Boomss
Boark II
Supperman
Superbore
Slonk
Lid Man
Green Hooter II
Starm Surper
Shartar
Goons
Nana
Rider Farm
Captain In
Redink
Wolver Man
Wizler
http://aiweirdness.com/post/140829108357/superheroes-designed-by-neural-network @Saelia
Quincelax
• Abilities: Sturdy, Secene Grace
• Hidden ability: Tunged Leus
Tortabool
• Ability: Healy Stream
Strangy
• Abilities: Wharmwbra, Darp
• Hidden ability: Magic Guard
Stangute
• Ability: Banger
• Hidden Ability: Drang
Tyrnakine
• Ability: Beak Eye
Minma
• Abilities: Buttery armor, Shell Armor
• Hidden ability: Weak armor
Pokémon Generated by Neural Network
http://aiweirdness.com/post/147834883707/pokemon-generated-by-neural-network @Saelia
Recipes at your own risk!
http://aiweirdness.com/post/163878889437/try-these-neural-network-generated-
recipes-at-your
Craft beer names by RNN
IPAs
• Dang River
• Yamquak
• Bigly Bomb Session IPA
• Binglezard Flack
• Earth 2 Sanebus
• Tower Of Ergelon
• Juicy Dripple IPA
• Wicked Geee
• Yampy
• Widee Banger Fripper IPA
Strong Pale Ales
• The Great Rebelgion
• Thick Back
• The Fraggerbar
• Dankering
• Third Maus
• Sip’s The Stunks Belgian
• Slambertangeriss
• Devil’s Chard
• Spore Of Gold
• The Oldumbrett’s Ring
• Gunder Of Traz
• Cherry Boof Cornester
• Humple Bobstore Barrel Aged
Amber Ales
• Snarging Red
• Warmel Halce’s Comp Ale
• Fire Pipe
• Blangelfest
• Stoodemfest
• Ole Blood Whisk
• Frog Trail Ale
• Ricias Donkey Brain
• Sacky Rover
• Gate Rooster
• Cramberhand
• O’Brien Irish Red
• River Smush Hoppy Amber Ale
• Rivernillion Amber
• Special North Imperial Red
• Ambre O’Woo’s Omella
Imperial Red Ale
Stouts
• The Moon
• The Bopberry Stout
• Cherry Coconut Mint Chocolate
Stout
• Black Morning
• Sir Coffee
• Shock State
• Take Bean
• Single Horde
• Whata Stout
• Shany Lace
• Barrel Aged Chocolate Milksmoke
• Shump
http://aiweirdness.com/post/163753995072/craft-beer-names-invented-by-neural-network@Saelia
Harry Potter and the difference between word-level and character-le
vel RNN
http://aiweirdness.com/post/164291045392/harry-potter-and-the-word-level-recurrent-neural
A character-by-character, or “char” model takes one text file as
input, and trains an RNN to predict the next character in a sequence.
The RNN can then be used to generate text character by character
that will look like the original training data.
New paint colors invented by neural network
http://aiweirdness.com/post/160985569682/paint-colors-designed-by-neural-network-part-2
• Star Trek:
The Next Generation
• Doctor Who and
the Daleks!
• Baseball players
• a fake lightning talk
(generated from
existing TED talks)
• The temperature flag makes the most difference. (Expects a number between 0 and 1.)
• Changes the novelty and noise is the system,
• Creates dramatically different output.
• Lower temperatures (e.g. 0.2) makes the RNN more confident, but more conservative
• It generates less noise, but less novel results.
• Using -temperature 0.2 gives clear English, but includes a lot of repeated words.
• Higher temperature makes more interesting/novel output, but more nonsense, misspelled words
• Everything is a trade-off.
• Experiment with all settings.
Temperature
Temperature 0.3 and 0.4
Temperature 0.5 and 0.6
• There are lots of things that affect how well the algorithm does. Temperature adjusts:
• whether the RNN always picks the most likely next character as it’s generating text,
or whether it will go with something farther down the list.
• Setting the temperature higher or lower can make the algorithm produce a much better output.
Temperature 0.7 (my favorite)
Deep Learning Virtual Machine on Azure
@Saelia
Deep Learning Virtual Machine on Azure
@Saelia
Deep Learning Virtual Machine on Azure
@Saelia
Deep Learning Virtual Machine on Azure: Price Calculator
@Saelia
Deep Learning Virtual Machine on Azu
re
• Commands to give you permission to write in Azure VM:
• sudo chown –R username: /dsvm/tools/torch
• sudo chmod –R u+w /dsvm/tools/torch/
• (replace “username” with your own username)
Deep Learning Virtual Machine on Azure
@Saelia
Deep Learning Virtual Machine on Azure
@Saelia
Create your free account today!
$200 credit
to explore
services for
30 days
12 months Always free
of popular
free
services
25+ services
aka.ms/MCTAzure
@Saelia
Complete our survey for a chance to win
a GoPro Hero 6!
aka.ms/MCT18
@Saelia
Need Resources? Check out Microsoft Docs!
Home of Microsoft Technical Documentation, API references, code
examples, quickstarts, and tutorials for developers and IT professionals
aka.ms/MCTDocs
.NET ASP.NET
SQL Enterprise Mobility
+Security
Dynamics 365 Azure Bot Service
System Center Microsoft Education
@Saelia
@Saelia
Thank you!
Ask me questions on Twitter: @Saelia
Sarah Sexton
Microsoft, Chicago
Software Engineer
@Saelia
Sequence Modelling and NLP With Deep Learning (Keras) Video:
https://www.youtube.com/watch?v=ZmCzrPVzDQI
Documentation Resources on RNNs:
https://github.com/jcjohnson/torch-rnn/blob/master/doc/flags.md#training
http://www.jeffreythompson.org/blog/2016/03/25/torch-rnn-mac-install/
https://github.com/jcjohnson/torch-rnn/issues/24
https://github.com/karpathy/char-rnn
https://github.com/crisbal/docker-torch-rnn
https://github.com/Element-Research/rnn
https://github.com/zer0n/deepframeworks/blob/master/README.md

More Related Content

What's hot

Webinar patterns anti patterns
Webinar patterns anti patternsWebinar patterns anti patterns
Webinar patterns anti patternsconfluent
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansiblewajrcs
 
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...DynamicInfraDays
 
Docker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanDocker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanjbminn
 
Chef - Infrastructure Automation for the Masses
Chef - Infrastructure Automation for the Masses�Chef - Infrastructure Automation for the Masses�
Chef - Infrastructure Automation for the MassesSai Perchard
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecAndreas Schmidt
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1Steven Shim
 
REX about installing Kubernetes on Premise
REX about installing Kubernetes on PremiseREX about installing Kubernetes on Premise
REX about installing Kubernetes on PremiseAnaël CHARDAN
 
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015 Apache Kafka Reliability Guarantees StrataHadoop NYC 2015
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015 Jeff Holoman
 

What's hot (11)

Webinar patterns anti patterns
Webinar patterns anti patternsWebinar patterns anti patterns
Webinar patterns anti patterns
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
 
Docker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanDocker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihan
 
Chef - Infrastructure Automation for the Masses
Chef - Infrastructure Automation for the Masses�Chef - Infrastructure Automation for the Masses�
Chef - Infrastructure Automation for the Masses
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspec
 
Hadoop presentation
Hadoop presentationHadoop presentation
Hadoop presentation
 
Ha of load balancer
Ha of load balancerHa of load balancer
Ha of load balancer
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1
 
REX about installing Kubernetes on Premise
REX about installing Kubernetes on PremiseREX about installing Kubernetes on Premise
REX about installing Kubernetes on Premise
 
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015 Apache Kafka Reliability Guarantees StrataHadoop NYC 2015
Apache Kafka Reliability Guarantees StrataHadoop NYC 2015
 

Similar to A Whirlwind Tour of Recurrent Neural Networks

Microarmy - by J2 Labs
Microarmy - by J2 LabsMicroarmy - by J2 Labs
Microarmy - by J2 LabsJames Dennis
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Charles Nutter
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkPatrick LaRoche
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandraaaronmorton
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled CucumbersJoseph Wilk
 
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwonThe basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwonKenneth Kwon
 
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...Skills Matter Talks
 
PHP Backends for Real-Time User Interaction using Apache Storm.
PHP Backends for Real-Time User Interaction using Apache Storm.PHP Backends for Real-Time User Interaction using Apache Storm.
PHP Backends for Real-Time User Interaction using Apache Storm.DECK36
 
[아이펀팩토리] 2017 NDCP
[아이펀팩토리] 2017 NDCP [아이펀팩토리] 2017 NDCP
[아이펀팩토리] 2017 NDCP iFunFactory Inc.
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
Modern Evasion Techniques
Modern Evasion TechniquesModern Evasion Techniques
Modern Evasion TechniquesJason Lang
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Puppet
 
Testing Wi-Fi with OSS Tools
Testing Wi-Fi with OSS ToolsTesting Wi-Fi with OSS Tools
Testing Wi-Fi with OSS ToolsAll Things Open
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)securityEnrico Zimuel
 

Similar to A Whirlwind Tour of Recurrent Neural Networks (20)

Run Node Run
Run Node RunRun Node Run
Run Node Run
 
Microarmy - by J2 Labs
Microarmy - by J2 LabsMicroarmy - by J2 Labs
Microarmy - by J2 Labs
 
Who Broke My Crypto
Who Broke My CryptoWho Broke My Crypto
Who Broke My Crypto
 
MySQL on AWS 101
MySQL on AWS 101MySQL on AWS 101
MySQL on AWS 101
 
Appsecforum2014 nov14-bk-cryptool-rump
Appsecforum2014 nov14-bk-cryptool-rumpAppsecforum2014 nov14-bk-cryptool-rump
Appsecforum2014 nov14-bk-cryptool-rump
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM Talk
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
 
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwonThe basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
 
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
 
PHP Backends for Real-Time User Interaction using Apache Storm.
PHP Backends for Real-Time User Interaction using Apache Storm.PHP Backends for Real-Time User Interaction using Apache Storm.
PHP Backends for Real-Time User Interaction using Apache Storm.
 
[아이펀팩토리] 2017 NDCP
[아이펀팩토리] 2017 NDCP [아이펀팩토리] 2017 NDCP
[아이펀팩토리] 2017 NDCP
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Modern Evasion Techniques
Modern Evasion TechniquesModern Evasion Techniques
Modern Evasion Techniques
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
 
Testing Wi-Fi with OSS Tools
Testing Wi-Fi with OSS ToolsTesting Wi-Fi with OSS Tools
Testing Wi-Fi with OSS Tools
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best Practices
 
Aes jul-upload
Aes jul-uploadAes jul-upload
Aes jul-upload
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)security
 

More from Sarah Sexton

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsSarah Sexton
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Sarah Sexton
 
Implementing LUIS in Node.js
Implementing LUIS in Node.jsImplementing LUIS in Node.js
Implementing LUIS in Node.jsSarah Sexton
 
Code camp HoloLens Build and Deploy
Code camp HoloLens Build and DeployCode camp HoloLens Build and Deploy
Code camp HoloLens Build and DeploySarah Sexton
 
How to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensHow to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensSarah Sexton
 
Breaking into Bots
Breaking into BotsBreaking into Bots
Breaking into BotsSarah Sexton
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkSarah Sexton
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TracerySarah Sexton
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybodySarah Sexton
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameSarah Sexton
 
Building Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureBuilding Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureSarah Sexton
 
New High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudNew High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudSarah Sexton
 
Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Sarah Sexton
 

More from Sarah Sexton (14)

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018
 
Implementing LUIS in Node.js
Implementing LUIS in Node.jsImplementing LUIS in Node.js
Implementing LUIS in Node.js
 
Mixed Reality
Mixed RealityMixed Reality
Mixed Reality
 
Code camp HoloLens Build and Deploy
Code camp HoloLens Build and DeployCode camp HoloLens Build and Deploy
Code camp HoloLens Build and Deploy
 
How to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensHow to Build and Deploy to HoloLens
How to Build and Deploy to HoloLens
 
Breaking into Bots
Breaking into BotsBreaking into Bots
Breaking into Bots
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot Framework
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with Tracery
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybody
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First Game
 
Building Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureBuilding Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to Azure
 
New High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudNew High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the Cloud
 
Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

A Whirlwind Tour of Recurrent Neural Networks

  • 1. A Whirlwind Tour of Recurrent Neural Networks Sarah Sexton Microsoft, Chicago Software Engineer @Saelia
  • 2. Love building new things...? @Saelia
  • 3. ...but hate thinking of a new name? @Saelia
  • 4. Thinking of a video game genre is easy...
  • 5. Run and train RNN To Run To pull or run Sarah’s pre-trained Docker snapshot to avoid waiting 8 hours, type: docker pull saelia/rnn-js To Train The way to actually make the RNN generate new Shakespeare text is with the data sampling script: th sample.lua -gpu -1 -checkpoint cv/checkpoint_12900.t7 -length 150 -temperature .7 GPU: Setting the flag gpu to -1 tells the code to train using CPU; otherwise it defaults to GPU 0. Checkpoints: While the model is training, it will periodically write checkpoint files to the cv folder. The frequency with which these checkpoints are written is controlled by the number of iterations, specified with the eval_val_every option. (E.g., if this is 1, then a checkpoint is written every iteration.) Length: An important flag is -length. 100 would generate a body of text 100 characters in length. The default is 2000. Temperature: An important parameter you may want to play with is -temperature, which takes a number in range (0 to 1, 0 not included), default = 1. Lower temperature will cause the model to make more “likely” but more boring and conservative predictions. Higher temperatures cause the model to take more chances and increase diversity of results, but at a cost of more mistakes. @Saelia
  • 7. Learn: • Docker experience • RNN knowledge • Great names by AI @Saelia X1 X2 Y A1 A2 A3 A4 B1 B2 B3 B4 Input layer Output layerHidden layers
  • 8. Superheroes Designed by Neural Network Speet Stank Red Fart Mister Man Rad Food Sapgirl Woop Ann Man Boomss Boark II Supperman Superbore Slonk Lid Man Green Hooter II Starm Surper Shartar Goons Nana Rider Farm Captain In Redink Wolver Man Wizler http://aiweirdness.com/post/140829108357/superheroes-designed-by-neural-network @Saelia
  • 9. Quincelax • Abilities: Sturdy, Secene Grace • Hidden ability: Tunged Leus Tortabool • Ability: Healy Stream Strangy • Abilities: Wharmwbra, Darp • Hidden ability: Magic Guard Stangute • Ability: Banger • Hidden Ability: Drang Tyrnakine • Ability: Beak Eye Minma • Abilities: Buttery armor, Shell Armor • Hidden ability: Weak armor Pokémon Generated by Neural Network http://aiweirdness.com/post/147834883707/pokemon-generated-by-neural-network @Saelia
  • 10. Recipes at your own risk! http://aiweirdness.com/post/163878889437/try-these-neural-network-generated- recipes-at-your
  • 11. Craft beer names by RNN IPAs • Dang River • Yamquak • Bigly Bomb Session IPA • Binglezard Flack • Earth 2 Sanebus • Tower Of Ergelon • Juicy Dripple IPA • Wicked Geee • Yampy • Widee Banger Fripper IPA Strong Pale Ales • The Great Rebelgion • Thick Back • The Fraggerbar • Dankering • Third Maus • Sip’s The Stunks Belgian • Slambertangeriss • Devil’s Chard • Spore Of Gold • The Oldumbrett’s Ring • Gunder Of Traz • Cherry Boof Cornester • Humple Bobstore Barrel Aged Amber Ales • Snarging Red • Warmel Halce’s Comp Ale • Fire Pipe • Blangelfest • Stoodemfest • Ole Blood Whisk • Frog Trail Ale • Ricias Donkey Brain • Sacky Rover • Gate Rooster • Cramberhand • O’Brien Irish Red • River Smush Hoppy Amber Ale • Rivernillion Amber • Special North Imperial Red • Ambre O’Woo’s Omella Imperial Red Ale Stouts • The Moon • The Bopberry Stout • Cherry Coconut Mint Chocolate Stout • Black Morning • Sir Coffee • Shock State • Take Bean • Single Horde • Whata Stout • Shany Lace • Barrel Aged Chocolate Milksmoke • Shump http://aiweirdness.com/post/163753995072/craft-beer-names-invented-by-neural-network@Saelia
  • 12. Harry Potter and the difference between word-level and character-le vel RNN http://aiweirdness.com/post/164291045392/harry-potter-and-the-word-level-recurrent-neural
  • 13. A character-by-character, or “char” model takes one text file as input, and trains an RNN to predict the next character in a sequence. The RNN can then be used to generate text character by character that will look like the original training data.
  • 14. New paint colors invented by neural network http://aiweirdness.com/post/160985569682/paint-colors-designed-by-neural-network-part-2
  • 15. • Star Trek: The Next Generation
  • 16. • Doctor Who and the Daleks!
  • 18. • a fake lightning talk (generated from existing TED talks)
  • 19. • The temperature flag makes the most difference. (Expects a number between 0 and 1.) • Changes the novelty and noise is the system, • Creates dramatically different output. • Lower temperatures (e.g. 0.2) makes the RNN more confident, but more conservative • It generates less noise, but less novel results. • Using -temperature 0.2 gives clear English, but includes a lot of repeated words. • Higher temperature makes more interesting/novel output, but more nonsense, misspelled words • Everything is a trade-off. • Experiment with all settings. Temperature
  • 22. • There are lots of things that affect how well the algorithm does. Temperature adjusts: • whether the RNN always picks the most likely next character as it’s generating text, or whether it will go with something farther down the list. • Setting the temperature higher or lower can make the algorithm produce a much better output. Temperature 0.7 (my favorite)
  • 23. Deep Learning Virtual Machine on Azure @Saelia
  • 24. Deep Learning Virtual Machine on Azure @Saelia
  • 25. Deep Learning Virtual Machine on Azure @Saelia
  • 26. Deep Learning Virtual Machine on Azure: Price Calculator @Saelia
  • 27. Deep Learning Virtual Machine on Azu re
  • 28. • Commands to give you permission to write in Azure VM: • sudo chown –R username: /dsvm/tools/torch • sudo chmod –R u+w /dsvm/tools/torch/ • (replace “username” with your own username) Deep Learning Virtual Machine on Azure @Saelia
  • 29. Deep Learning Virtual Machine on Azure @Saelia
  • 30. Create your free account today! $200 credit to explore services for 30 days 12 months Always free of popular free services 25+ services aka.ms/MCTAzure @Saelia
  • 31. Complete our survey for a chance to win a GoPro Hero 6! aka.ms/MCT18 @Saelia
  • 32. Need Resources? Check out Microsoft Docs! Home of Microsoft Technical Documentation, API references, code examples, quickstarts, and tutorials for developers and IT professionals aka.ms/MCTDocs .NET ASP.NET SQL Enterprise Mobility +Security Dynamics 365 Azure Bot Service System Center Microsoft Education @Saelia
  • 33. @Saelia Thank you! Ask me questions on Twitter: @Saelia Sarah Sexton Microsoft, Chicago Software Engineer
  • 34. @Saelia Sequence Modelling and NLP With Deep Learning (Keras) Video: https://www.youtube.com/watch?v=ZmCzrPVzDQI Documentation Resources on RNNs: https://github.com/jcjohnson/torch-rnn/blob/master/doc/flags.md#training http://www.jeffreythompson.org/blog/2016/03/25/torch-rnn-mac-install/ https://github.com/jcjohnson/torch-rnn/issues/24 https://github.com/karpathy/char-rnn https://github.com/crisbal/docker-torch-rnn https://github.com/Element-Research/rnn https://github.com/zer0n/deepframeworks/blob/master/README.md

Editor's Notes

  1. Hello everybody! Thank you for coming to my talk!
  2. I wanted to generate names for video games with an RNN. Recurrent Neural Networks are supposed to be this cutting-edge buzzword, the latest in Machine Learning Artificial Intelligence, a way to generate smart new text.
  3. There are lots of things that affect how well the algorithm does. One simple change turns out to be the “temperature” (think: creativity) variable, which adjusts whether the neural network always picks the most likely next character as it’s generating text, or whether it will go with something farther down the list. I had the temperature originally set pretty high, but it turns out that when I turn it down ever so slightly, the algorithm does a lot better. Not only do the names better match the colors, but it begins to reproduce color gradients that must have been in the original dataset all along. Colors tend to be grouped together in these gradients, so it shifts gradually from greens to browns to blues to yellows, etc. and does eventually cover the rainbow, not just beige.
  4. [examples of what people created, with our inspiration]
  5. [examples of what people created, with our inspiration]
  6. [examples of what people created, with our inspiration]
  7. [examples of what people created, with our inspiration]