SlideShare una empresa de Scribd logo
1 de 21
Love building new
things...?
...but hate thinking
of a new name?
Thinking of a video game
genre is easy...
Intro Video
• https://channel9.msdn.com/posts/Whirlwind-Tour-RNNs
Make it Easy to play with AI
Easy to set up
Easy to use
Easy access to Docker Hub with full guidance
Connection to Chat Bot with Node.js
Menu | Help | Small talk
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.
RNNs: Fascinating but Difficult
Learned
• Docker experience
• RNN knowledge
• Bot connection
• Great names by AI
Superheroes Designed by Neural Netw
ork
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
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
Recipes at your own risk!
http://aiweirdness.com/post/163878889437/try-these-neural-network-generated
-recipes-at-your
Craft beer names, invented by neural net
work
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
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
• 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, misspelle
d 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)
Setup

Más contenido relacionado

Similar a Recurrent Neural Networks (RNN)

Dmk blackops2006 ccc
Dmk blackops2006 cccDmk blackops2006 ccc
Dmk blackops2006 ccc
Dan Kaminsky
 

Similar a Recurrent Neural Networks (RNN) (20)

Run Node Run
Run Node RunRun Node Run
Run Node Run
 
Who Broke My Crypto
Who Broke My CryptoWho Broke My Crypto
Who Broke My Crypto
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
 
Knee deep in the undef - Tales from refactoring old Puppet codebases
Knee deep in the undef  - Tales from refactoring old Puppet codebasesKnee deep in the undef  - Tales from refactoring old Puppet codebases
Knee deep in the undef - Tales from refactoring old Puppet codebases
 
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.
 
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
 
Resource-Efficient Deep Learning Model Selection on Apache Spark
Resource-Efficient Deep Learning Model Selection on Apache SparkResource-Efficient Deep Learning Model Selection on Apache Spark
Resource-Efficient Deep Learning Model Selection on Apache Spark
 
Apache storm vs. Spark Streaming
Apache storm vs. Spark StreamingApache storm vs. Spark Streaming
Apache storm vs. Spark Streaming
 
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
 
Elegant concurrency
Elegant concurrencyElegant concurrency
Elegant concurrency
 
Dmk blackops2006 ccc
Dmk blackops2006 cccDmk blackops2006 ccc
Dmk blackops2006 ccc
 
CONFidence 2015: when something overflowing... - Peter Hlavaty
CONFidence 2015: when something overflowing... - Peter HlavatyCONFidence 2015: when something overflowing... - Peter Hlavaty
CONFidence 2015: when something overflowing... - Peter Hlavaty
 
When is something overflowing
When is something overflowingWhen is something overflowing
When is something overflowing
 
IP Multicast on ec2
IP Multicast on ec2IP Multicast on ec2
IP Multicast on ec2
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)security
 
Kloud
KloudKloud
Kloud
 
Microarmy - by J2 Labs
Microarmy - by J2 LabsMicroarmy - by J2 Labs
Microarmy - by J2 Labs
 
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
 
QCon London.pdf
QCon London.pdfQCon London.pdf
QCon London.pdf
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 

Más de Sarah Sexton

Más de 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
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Recurrent Neural Networks (RNN)

  • 1.
  • 4. Thinking of a video game genre is easy...
  • 6. Make it Easy to play with AI Easy to set up Easy to use Easy access to Docker Hub with full guidance Connection to Chat Bot with Node.js Menu | Help | Small talk
  • 7. 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.
  • 9. Learned • Docker experience • RNN knowledge • Bot connection • Great names by AI
  • 10. Superheroes Designed by Neural Netw ork 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
  • 11. 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
  • 12. Recipes at your own risk! http://aiweirdness.com/post/163878889437/try-these-neural-network-generated -recipes-at-your
  • 13. Craft beer names, invented by neural net work 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
  • 14. 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
  • 15. 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.
  • 16. New paint colors invented by neural network http://aiweirdness.com/post/160985569682/paint-colors-designed-by-neural-network-part-2
  • 17. • 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, misspelle d words • Everything is a trade-off. • Experiment with all settings. Temperature
  • 20. • 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)
  • 21. Setup

Notas del editor

  1. 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.