Infuse AI into your web applications – AI and JavaScript – BRK2384

Infuse AI into your web applications – AI and JavaScript – BRK2384


SESSION, AI, WEAPON APPLICATIONS, AI JAVA SCRIPT, I WANTED, I WANTED AI JAVA SCRIPT ROCKS. YOU CAN FIND KNEE AT JAW ACHE, I BLOG ABOUT ANGULAR AND JAVA SCRIPT AT CODE CROFT TV. I’M A CLOUD DEVELOPER ADVOCATE MICROSOFT. WE ARE THE OPEN SOURCE ADVOCATES THERE ARE ABOUTS 60 OF US, TEN OR 15 OF US AT IGNITE THERE. IF YOU WILL LOOK AT THE LINK MY AREA OF BE SPERLT IS JAVA SCRIPT. VERVE SPECIFICALLY, IT’S A TWO WAY STREET WITH US. SO WE ROLL UP DIRECTLY INTO THE ENGINEERING ORGANIZATION, SO BOTH I STAND I TALK TO DEVELOPERS ALL OVER THE WORLD AND I ADVOCATE AZURE TO DEVELOPERS. BUT AT THE SAME TIME, I ALSO ADVOCATE KIND OF WEB AND JAVA SCRIPT TECHNOLOGIES BACK TO THE DEVELOPMENT TEAM. IF YOU HAVE ANYTHING ON WEB OR JAVA SCRIPT ON AZURE, I’VE GOT A STRAIGHT LINE BACK INTO THE P.M. ORGZ. ORGS. DO ANY OF MY STUDENTS ON U DEMI? THEY RECENTLY TRANSCRIBED BY NAME INTO AWESOME. MY NAME IS AWESOME. I TRIED CHANGING MY HANDLE, IT LASTED FOR TWO WEEKS BEFORE MY BOSS TOLD ME TO CHANGE IT BACK. THEY HAVE TO CONTACT ME IT’[email protected] MY FRIENDS SLIDE, INTERWEB DEVELOPMENT HEARS ME. WE’VE ALWAYS BEEN INTERESTED IN THE MACHINE RUNNING, I USED TO DO A LOT OF MACHINE LEARNING. NOT MINE. I OWN THIS SLIDE. ME AND ELEANOR WERE HIKING EARLIER THIS YEAR AND A LOT OF INTERESTING STUFF HAS BEEN GOING ON WITH AI AND JAVA SCRIPT, LET’S MAKE A MEETUP GROUP AND LET’S TALK ABOUT THIS STUFF WITH OTHER DEVELOPERS IN LONDON. I WAS VERY GOOD FOR SIX MONTHS. ONE OF THE FASTEST MEETUP GROUPS IN LONT. SEND THOSE LINKS TO DEMOS, AI JAVA SCRIPT DEMOS. MAYBE WE SHOULD PUT THIS ON THE WEBSITE, CELEBRATE AI AND JAVA SCRIPT, IT IS CALLED AI/JS ROCKS. WHAT IT IS IS BASICALLY JUST AN INSPIRATIONAL COLLECTION WHATEVER INSPIRATIONAL COLLECTION OF AI JAVA SCRIMENTS. THERE WAS A BETTER TAG LINE THAN THAT, I CAN’T REMEMBER IT. CURATED COLLECTION OF AI JAVA SCRIPT APPLICATIONS. A WHOLE BUNCH OF OTHER AI JAVA SCRIPT APPLICATIONS. WHAT WE WANTED TO HAVE AT THE SITE IS A PLACE WHERE YOU CAN LEARN AS WELL AS BE INSPIRED. EACH AND EVERY ONE OF THE APPLICATIONS HAS A LINK SO YOU CAN GO AND TRY THE APPLICATION, JAVA SCRIPT YOU CAN RUN IT SOMEWHERE. BUT WE WANTED IT A PLACE TO BE WHERE YOU CAN LEARN. BROWS THE SOURCE CODE, SEE HOW IT WAS BUILT OR A LINK TO SOME MORE INFORMATION ABOUT THE APPLICATION. FIND OUT MORE DETAILS ABOUT IT. THE GOAL FOR WEBSITE IS A PLACE WE CAN GO AND BE INSPIRED AND LEARN, OKAY. WHAT WE WANT TO GET TO YOU TODAY IS A BUNCH OF DEMOS FROM THE SITE, RACE THROUGH A BUNCH OF DIFFERENT AI JAVA SCRIPT APPLICATIONS. I’M GOING TO TEACH YOU SHOW YOU AWAY IT DOES. SHOW YOU HOW IT DOES IT, LEARN A LOT MORE ABOUT DIFFERENT WAYS IN WHICH CAN YOU DO AI IN JAVA SCRIPTS, OKAY FM RIGHT FIRST APPLICATION. BOATUS. IT IS INTRODUCTION TO THE PLANET MONEY PODCAST. BOATUS IS AN APPLICATION THEY MADE KIND OF LATE LAST YEAR. THEY DISCOVERED IF SOMETHING TWEETED SOMETHING POSITIVE ABOUT A COMPANY, THE SOCK PRICE WOULD GO UP AND NEGATIVE IT WOULD GO DOWN. WHAT WOULD BE DONE IF WE BUILT A TRADING BOT. WE’RE ON TWITTER AT BOTUS. WHAT KIND OF TRADES IT MADE. YOU WOULD HAVE BEEN ABLE TO BUT IN FACT THEY SHUT IT DOWN, IT PODCAST RATHER THAN AN INVESTMENT FIRM. I ACCIDENTALLY ONCE FORGOT THAT I BOUGHT SOME GOLD. THE RULE OF BOTUS IS PRETTY SUMP. IF IT’S A POSITIVE IT BUYS $100 OF THE CURRENCY. AT THE DEPOSITORY BY THE U.C. IF IT IS A NEGATIVE TWEET IT SELLS ALL THE CURRENCY. USD IT INVERSELY BUYS AND SELLS GOLD. THE AWRP, KEY PART OF IT, YOU’VE GOT PART OF THE APPLICATION TWITTER FEED. IT’S GOT A TWEET. SENTIMENT SCORE FOR THIS TWEET, THE MEANING BEHIND THE TWEET. THIS OTHER TWEET THE SCORE IS VERY, VERY LOW SO DESCRIBED AS A NEGATIVE TWEET, EMOTIONALLY NEGATIVE. HOW DO YOU FIGURE OUT IF SOMETHING’S POSITIVE OR NEGATIVE, RIGHT? YOU DO SOMETHING CALLED SENTIMENT FALSE. WHICH IS QUITE ARE A COMORN PATTERN THESE DAYS. HOW DO YOU, YOU GATHER A BUNCH OF DATA, I LOVE YOU I HATE YOU NO WAY I LOVE THIS THIS IS RUBBISH, LETS MEET AT 10 P.M. BUT THE KEY IS YOU HAVE TO LABEL THIS DATA. SOMEBODY A HUMAN NEEDS TO GO AWAY AND ACTUALLY TAG EACH ONE OF TEASE AS POSITIVE OR NEGATIVE. YOU ACTUALLY NEED QUITE A FEW HUMAN BEINGS INVOLVED, AS WELL. THE SAME SENTENCE TO ONE PERSON CAN BE POSITIVE AND TO ANOTHER IS NEGATIVE. ESSENTIALLY THERE IS A LOT MORE THAT GOES ON HERE AS WELL. BUT ESSENTIALLY YOU GET THAT TRAINING DATA AND PUMP IT INTO CLASSIFIES. IT LEARNS AND TRAINS AND AT THE END OF THE DAY, IT GENERATES A MODEL. OKAY? SO THE MODEL IS STATIC. WHATEVER IT MAY BE, A SERIES OF WEALTHS OR JUST A LONG MATH MAT CAM EQUATION BUT ESSENTIALLY — MATHEMATICAL EQUATION. THE THING ABOUT AI IS WE TRAINED ON ONE SET OF DATA BUT WE CAN GIVE IT SOMETHING IT’S NEVER SEEN BEFORE AND HOW THEY TRY OINFER WHETHER OR NOT IT’S A POSITIVE OR NEGATIVE TWEET. AND THAT’S THE POWER OF AI. RIGHT? YOU CAN TRAIN ON ONE SET OF DATA BUT THEN YOU CAN GIVE IT DIFFERENT PROBLEMS FROM THE SAME DOMAIN AND IT CAN THEN GIVE YOU DIFFERENT ANSWERS, RIGHT? LOTS OF DIFFERENT WAYS. ONE THING YOU WOULD DO IS GET THIS MODEL, AGAIN IT’S USUALLY QUITE STATIC. YOU CAN DOWNLOAD AND PUT IT ON YOUR DEVICE, WE WOULD GET IT ON THE POLED, EXPORT IT, PUT IT ON THE SERVER SOMEWHERE AND WE WOULD WRAP IT IN A FRAMEWORK AND MAKE SOME API SENTIMENT OF THE TEXT. THAT’S WHAT YOU DO NP AZURE. TEST ANALYTICS API. PART OF IT IS THE SUITE OF SERVICES CALLED AZURE COMMON SERVICES. WELL-KNOWN PROBLEMS AND CRUNCHING THE MODEL THAT REPRESENTS IT, AND THEN WRAPPING IT IN AN API AN MAKE IT AVAILABLE TO PEOPLE, THESE SERVICES IS A CRE COMMON PATTERN THESE DAYS. THIS IS ONE OF THE BIGGEST GROWTHS IN THE AI AREA THAT I’VE SEEN IN THE LAST TWO YEARS. MANY, MANY PEOPLE ARE STARTING TO BUILD THESE SERVICES AND RELEASE THEMS. I THINK WE HAVE ONE OF THE BEST SERVICES OUT THERE, VERY USEFUL, VERY BROAD BRAT. YOU MAKE AN ACTUAL API REQUEST, RIGHT? RETURNS THE KEY PHRASES OF THE TEXT AS WELL. SO ABSTRACTS OUT FROM THE TEXT KIND OF KEY TERMS WHICH IS VERY YUX WHEN YOU WANT TO MAKE, FIGURE OUT IF THE TWEET IS ABOUT MEXICO. AND ALSO THE SENTIMENT AS WELL. WHY IS THIS NOT WORKING? THE SENTIMENT SCORE AS WELL. SENTIMENT SCORE AS WELL, THAT’S A TEXT ANALYTICS API. I WOULD SAY IF YOU ARE FACING A PROBLEM THAT MIGHT BE ABLE TO SERVE FOR API, SENTIMENT ANALYSIS IS SO COMMON IT’S BEEN VERY WELL DOCUMENTED FOR 30 YEARS. THERE ARE SO MANY MODELS OUT THERE. JUST SEARCH FOR AN API, SEARCH FOR A MODEL. LLY HAVE TO TRAIN YOUR OWN MODEL. FOR INSTANCE WHEN YOU ARE DEALING WITH UNCOMMON DOMAINS OF TEXT. FOR INSTANCE IF YOU ARE DEALING WITH DEEP ACADEMIC TEXT IN A PARTICULAR MEDICAL FIELD, THE TEXT MAY BE DIFFERENT, YOU MAY WANT TO TRAIN YOUR OWN SENTIMENT ANALYSIS WITH THAT VOLUME OF DATA, BUT IF IT’S JUST GENERAL SET FOR API. ALL RIGHT, VOICE CALCULATOR. THERE IS ANOTHER DEMONSTRATION, BY MY COLLEAGUE. HOPEFULLY THE SOUND WILL WORK. WE’LL SEE. ADD BY, MULTIPALLY THREE, SUBTRACT TWO. YOU CAN GO IN AND TRY OUT. THIS IS THE VOICE POWERED CALCULATOR. OKAY? IT’S DOING TWO THINGS, CONVERTING VOICE TO TEXT, WE HAVE AN API FOR THAT. IT IS USING A BROWSER BASED SPEECH TO TEXT API TO DO THAT. BUT TO UNDERSTAND THE TEXT TO UNDERSTAND COMMANDS IT’S USING ONE OF THE OTHER OF OUR SERVICES, LEWIS API. DOES ANYBODY USE LEWIS API? A FEW PEOPLE, ACTUALLY FOUR. I HAVE A PROBLEM WITH EXAGGERATING. IT IS ONE OF THE EASIEST APIS APIS THAT WE HAVE. MY COLLEAGUE BERT HOLD WROTE AN ARTICLE, GREAT RECOMMENDATION TO ASI. HE USED TO IT BUILD A CHAT BOT TO CONTROL THE LIGHTS OF HIS HOUSE. HOW IT WORKS IS YOU BASICALLY, YOU GET THESE KIND OF EXAMPLES JUST AS I DESCRIBED BEFORE WITH SENTIMENT ANALYSIS. YOU DO AN EXAMPLE OF TEXT. YOU GET EXAMPLES AND THEY’RE ACTUALLY TERMED UTTERANCES. EACH OF THIS IS AN UTTERANCE. SUCH A BRITISH WORD. I FIND IT ODD. YOU HAVE TO TAG THEM YOURSELF. YOU HAVE TO HAVE THE TEXT AND YOU HAVE TO TAG THEM MANUALLY. YOU HAVE TO GRAB THE UTTERANCE AND TAG IT, THE WORDS THERE THAT SIGNAL THE POWER AND THEN YOU CAN ALSO TAG LOCATION AS WELL. ONCE IT’S ALL TAGGED YOU THEN CAN JUST TRAIN IT. AND THIS IS DOING THE SAME THING AS BEFORE, LEARNING TO UNDERSTAND THE NATURAL LANGUAGE, NATURAL HUMAN LANGUAGE. AND THEN THE WHOLE THING IS THEN AVAILABLE TO YOU VIA AN API. IF YOU ACCENT IT TURN OFF THE GARAGE LIGHTS, IT’S GOING TO KNOW THAT YOUR INTENT IS TO CONTROL LARGE, THE VALUE POWER, THE LOCATION, GARAGE. WE NEED THINGS TO BE PRECISE, OKAY? LEWIS IS A THING THAT HELPS YOU SOLVE THAT PROBLEM. IF YOU DON’T WANT TO USE AN API TO SOLVE PROBLEMS, THIS IS SOMETHING THAT CAME OUT RECENTLY MLP.JS. THERE ARE A COUPLE OF OTHERS AS WELL. VERY GOOD FOR CHAT BOTS. IT IS A JAVA SCRIPT LIBRARY, RUNNING ON THE CLIENT SIDE. MAKE AN API REQUEST, LOCAL API REQUEST TO A LOCAL SERVER, BECAUSE IT’S A CHAT WINDOW. THIS LETS YOU RUN IT LOCALLY. NOW IT’S NOT GOING TO GIVE YOU AS MUCH ACCURACY, IT WILL GIVE YOU SOMETHING YOU CAN RUN ON THE CLIENT SIDE IF THAT’S WHAT YOU NEED. SO TO SUMMARIZE, I REALLY LOVE LEWIS AND CHAT BOTS. DIP OUR TOES IN ANT MOVE INTO IT SLOWLY. YOU HAVE TO THINK ABOUT CERTAIN IDEAS, YOU HAVE TO THINK ABOUT UTTERANCES AND TRAINING. YOU START DIPPING YOUR TOES INTO IT BUT A LOT OF THINGS ARE HANDLED FOR YOU. BY WRAPPING UP THINGS IN APIS AND LETTING YOU BUILD VERY QUICKLY IT DOES HELP YOU GET INTO SPACE. TRY LEWIS API, SEARCH ONE OF THE OTHER ONES. I DO RECOMMEND THIS AS A GOOD START. ONE OF THE FAVORITES, ABOUT TRADEMARKS, TM STARTS FOR MOIK FOR EMOJI FIRE. WITH EMOJI FIRE WHAT YOU CAN DO IS PASS AN IMAGE AND ANY GUESSES? SHOUT IT? [INAUDIBLE] (LAUGHING) HAVE THE PRIZE THERE, YES EMOJI FIRE IT. BASICALLY IT FIGURES OUT WHERE YOUR FACE IS IN AN IMAGE, NUMBER 1, FIGURES OUT THE EMOTION ON YOUR FACE, WHOA! AND THEN FIGURES OUT THE CORRECT EMOJI THAT MATCHES THAT EMOTION, AND THEN PUTS ON YOUR FACE. RIGHT? THE EMOJI FIRE. I ORIGINALLY WROTE IT AS A TWITTER BOT WHICH I’LL EXPLAIN TO YOU WHY THAT DIDN’T QUITE WORK OUT AS YOU PLANNED. I ORIGINALLY WROIT AS TWITTER BOT, IT MAY STILL WORK BUT IF YOU GO INTO TWITTER AND POST THEM EMOJI IFY, IT DOESN’T QUITE DO THAT BECAUSE PERHAPS MAYBE OR MAY NOT BE SOME ACTIONS OF CERTAIN COUNTRIES, WITH MAKE BOTS, SORT OF HAVE KIND OF CRACKED DOWN REALLY, REALLY HARD ON KIND OF ANY AUTOMATED TWITTER-BOTS AND MINE GOT SHAD EBANNED TWICE. HAS ANYBODY HEARD OF BEING SHADOW BANNED? BEING SHADOW BANNED? THE WEIRDEST THING IN THE WORLD. A SHADOW BAN, YOU GET BANNED, THE ONLY THING IS NOBODY CAN SEE YOUR TWEETS, OKAY? IMAGINE BE A DEVELOPER, DEBUGGING THIS. THE FUNCTION ENDED CORRECTLY, I CAN SEE THE TWEET BUT NO ONE’S LIKING IT. YEAH IT’S BECAUSE NO ONE ELSE CAN SEE THE TWEET. IT GOT SHADOW BANNED TWICE. I’VE REWRITTEN THIS TWICE. I’LL GIVE YOU LINKS LATER ON. THE THING THAT THE PEOPLE WERE A LITTLE BIT WOO ABOUT, HOW DO YOU GO ABOUT CALCULATING EMOTION. TO UNDERSTAND THAT, THIS IS WHERE I STOP TALKING ABOUT ARTIFICIAL NEURAL NETWORKS. BUILDING NEURAL NETWORK. FIVE, I’M TALKING TO EVERYBODY ELSE NOW. WHAT IS A NEURAL NETWORK? NEURAL NETWORK IS BASED UPON REAL BIOLOGICAL ASPECTS. SO BASED ON A BIOLOGICAL NEURON. ONE NEURON IN YOUR BRAIN HAS DENDRITES THAT FLOW IN. IF ENOUGH ELECTRICITY FLOWS IN IT FIRES OUT TO THE AXONS. IF YOU PUT BILLIONS OF THESE IN YOUR HEAD YOU FORM A BRAIN. I PERSONALLY FEEL IT’S A LITTLE BIT MORE TO CONSCIOUSNESS THAN BRAIN BUT THE BRAIN CAN DO QUITE A LOT OF INTELLIGENT THINGS. THE THING IS YOU CAN CREATE ONE OF THESE ARTIFICIALLY. IF YOU THINK BIT, IT’S KNOT THAT COMPLICATED RIGHT? IF YOU WERE — IT’S NOT THAT COMPLICATED RIGHT? YOU PROBABLY DID THIS AT UNIVERSITY. IT’S JUST A NODE WITH EDGES GOING IN. COMPUTER SCIENCE 101 OR SOMETHING, EDGES GOING IN AND THEN WHAT WE DO IS WE PUMP VALUES 52 THESE INPUTS, I MEAN THE INPUTS HAS WHAT, EDGES HAS WEIGHTS, OKAY, EDGES MAY BE DIFFERENT THINGS, IT MAY BE, I DON’T KNOW, HOUSE PRICE TIMES NUMBER OF KENTUCKY FRIED CHICKENS OR SOMETHING LIKE THAT IN YOUR AREA. THERE WAS A STUDY DONE IN THE U.K. ABOUT THIS. AND THEN WE HAVE THE WEIGHTS AND BASICALLY PUMPS IT THROUGH SOMETHING CALLED AN ACTIVATION FUNCTION. IT WAS ONLY GOING TO PUMP OUT ENOUGH ELECTRICITY OUT IF IT PUMPS ENOUGH IN. IF YOU CONNECT ENOUGH TO GO YOU ESSENTIALLY GET A NEURAL NETWORK. SO LOOK AT THE SCENE? ANIMATIONS! THIS IS IT, ALL THE MATHEMATICS THAT’S HAPPENING IN THIS NEURAL NETWORK. YOU GET INPUT VALUES, MULTIPLY THEM BY THE WEIGHTS, ADD THEM TOGETHER, PUMP THEM THROUGH THIS ACTIVATION FUNCTION AND INPUTS ANOTHER NUMBER. THIS GOES INPUT INTO ANOTHER ONE AND INPURT INTO ANOTHER ONE AND INPUT INTO THE OTHER ONE. THE ACTIVATION FUNCTIONS YOU CAN HAVE DIFFERENT ONES, VERY, VERY SIMPLE ONE. YOU CAN IMAGINE VALUES JUST BELOW ZERO IS ZERO, JUST OVER ZERO IS ONE. VERY EASY TO CALCULATE BUT IT HAS A PROBLEM IN THAT SMALL VALUES HAVE BIG JUMPS. ANOTHER ONE GIVES YOU MORE OF A GRADIENT. SOMETHING CALLED RECTIVATED LINEAR UNIT. ALL YOU’RE DOING WITH A NEURAL NETWORK IS GETTING THOSE VERY, VERY SMALL BUILDING BLOCKS AND CONNECTING THEM ALL TOGETHER. VERY, VERY SIMPLE NEURAL NETWORK. ONE INPUT LAYER, ONE OUTPURT LAYER TO HIDDEN LAYERS JUST ALL CONNECTED TOGETHER. WHAT YOU DO WHEN YOU CREATE ONE OF THESE YOU INITIALIZE EACH OF THESE EDGES WITH A RANDOM VALUE, JUST A RANDOM VALUE AND THEN YOU GET ONE ACTIVE FROM YOUR TRAINING DATA. IF IT’S EMOTION MAYBE WHAT WE’RE GETTING IS MAYBE PREPROCESSED IT THROUGH SOME COMPUTER VISION LIBRARY AND GRABBED THE VARIOUS POINTS ON A FACE, THOSE FAMOUS LANDMARKS ON AFACE. MAYBE THOSE ARE THE INPUTS TO OUR NEURAL NETWORK AND THE OUTPUT ZERO IS UNHAPPY AND 10 IS VERY HAPPY. THAT’S WHAT WE WANT ON THIS. WE FEED IN THOSE LANDMARKS AND ESSENTIALLY JUST THAT MULTIPLICATION. ALL THAT NEURAL NETWORK AT THE END OF THE DAY IS LOTS OF NETWORKS LOTS OF MULTIPLICATION, RIGHT? IT THINKS THAT MY FACE IS VERY UNHAPPY. BUT WHAT IF I KNEW THAT I WAS ACTUALLY PRETTY HAPPY? RIGHT? IF I KNEW I WAS PRETTY HAPPY I WOULD KNOW THAT THE NEURAL NETWORK IS OFF BY FIVE. AND THE MAGIC OF A NEURAL NETWORK, THE COMPLEX PART OF A NEURAL NETWORK IS HOW DO YOU T COMES OUT TO CHANGE IT. THAT PROCESS IS CALLED BARK PROPAGATION, OKAY? THAT’S WHAT YOU ARE DOING IS BACK PROPAGATE. THERE IS AN ERROR OF MINUS 5. YOU HAVE TO ADJUST THE WEIGHT SOMEHOW THAT THE NEXT TIME YOU GO THROUGH IT’S GOING TO GIVE YOU AI AGAIN. BACK PROPAGATION. MAYBE THE WEIGHTS DO THAT TRAINING EXCHANGE TO THIS. AND WHEN YOU PASS THE SAME DATA IT IS GOING TO GIVE YOU THE NEW EMOTION. WHEN YOU PASS THAT DATA IT’S GOING TO ACCURATELY PREDICT THE EMOTIONS. YOU COULD DO IT THAT WAY. ANY GUESSES WHAT I’MING GOING TO SUGGEST AS AN ALTERNATIVE? NO. OKAY. AZURE FACE API. I WISH THIS IS A VERY UNFORTUNATE PICTURE WE HAVE IN THE COGNITIVE SERVICES, ON ALL OF THEM, THE SAME PERSON, JUST LOOKS REALLY CONFUSED. I FEEL IT SHOULD BE A FACE OF SOMEBODY WHO SOMEHOW UNDERSTANDS WHAT’S GOING ON. BUT IT’S WHAT IS THIS? WE HAVE A FACE API. IT DOES A LOT ARE MORE THAN JUST EMOTION. BUT EMOTION IS THE FUNNEST THING IT DOES. IT HAS A REAL VALUE TO IT AS WELL. BUT IT’S AGAIN JUST AS EASY AS ANYTHING ELSE. JUST BASICALLY POST AN IMAGE, POST A PATH TO AN IMAGE OR BINARY DATA ITSELF. THIS IS A SUBSET OF DATA IT WILL SEND YOU. ARRAY FOR ONE EACH FACE, THE ACTUAL RECTANGLE, FOR PLACING EMOJI, REMEMBER THIS IS EMOJIIFY, GIVES YOU A FACE THAT SHOWS ANGER SAD NECESSARY SURPRISE, A LITTLE BIT OF A SURPRISE, IF YOU HAVE A BID YOU CAN’T BE 100 HAPPY, ACCORDING TO THE FACE API ABOUT I CAN GET TO 99.99. I CAN NEVER GET TO 100 WHICH IS SAD IN A WAY. IN RETURN A WHOLE BUCH OF DATA, IF YOU WANT TO GET THE EXACT LOCATIONS OF LANDMARKS IT WILL RETURN YOU THAT AS WELL. SO SUMMARIZE. WHAT I WANTED TO GET ACROSS IS NEURAL NETWORKS ARE VERY, VERY POSSIBLE AND THE APIS WE HAVE HAVE BEEN BUILT INTERNALLY USING NEURAL NETWORKS. AT LEAST I THINK, BECAUSE WE’RE NOT TOLD BECAUSE IT’S PROPRIETARY. BUT ACCOUNT FOR USING NEURAL NETWORKS. THE OTHER THING I WANT TO GET ACROSS, I THINK THESE ARE QUITE SIMPLE TO UNDERSTAND. I EXPLAIN THE BASIC CASE IN LIKE FIVE MINUTES. THERE ARE FAR, FAR, FAR MORE COMPLEX EXAMPLES BUT THE BASIC UNDERSTANDING YOU CAN GET FAIRLY QUICKLY. OKAY NEXT FLOW, TENSER FLOW I’M FINE, IS A WEIRD NAME FOR OUR TEAM’S T SHIRT, BUILD ON A PUPPY STAND WHERE YOU CAN GO AND PET ANIMALS, AZURE, PUPPIES AND I’M FINE. I RUN A WORKSHOP IN LONDON, AN AI WORKSHOP IN LONDON ACOUPLE OF MONTHS AGO AND I WAS WEARING THAT TEE SHIRT. MADE A DEMO BASED ON WHAT YOU LEARN IN THAT WORKSHOP HE CALLED IT THIS NAME. IT’S QUITE SIMPLE. SO WHAT IT DOES CAN YOU PASS THE IMAGES AND YOU CAN ACTUALLY TRY AND GUESS WHAT’S IN THE IMAGE, RIGHT? SO HERE, UNFORTUNATELY IT IS A SMALL CHILD, MINI SKIRT WHATEVER, SAM SAND BAR SEASHORE, FAIRLY OKAY WITH THIS ONE. OTHER ONE YOU DO SEARCH FOR PUPPIES. API REQUEST FROM UNSPLASH, SOME OF THE PUPPY RETURNS, IT’S NOT EVEN A FAIR COAT TO BE HONEST WITH YOU. IT SEARCHES FOR I’M FINE, KIND OF WHAT IT GIVES YOU ACTUALLY. THAT’S THE AZURE AGAIN, WHATEVER, NOT DOING A GREAT JOB AT THIS POINT. SOMETIMES IT DOES AN OKAY JOB, MOST OF THE TIME IT DOES A PRETTY BAD JOB. THE IMPORTANT THING TO REMEMBER ABOUT THIS PARTICULAR DEMO IS THIS IS ALL RUNNING IN JAVA SCRIPT IN THE BROWSER, OKAY? THE ONLY API REQUEST THIS IS MAKING IS TO UNSPLASH TO GET AN IMAGE. THE ACTUAL GUESSING OF THE IMAGE IS HAPPENING INSIDE BROWSER USING A FRAMEWORK CALLED MOBILE NET, OKAY? AND HOW IS THAT HAPPENING? WELL IT’S USING A TOOL CALLED TENSA FLOW. EVERY TIME I ASK THIS QUESTION IT’S A DIFFERENT SET OF FOUR PEOPLE. THE SET OF FOUR PEOPLE WHO KNOW TENSA FLOW IS A DIFFERENT SET OF FOUR WHO KNOW NEURAL NETWORKS. SO TENSA FLOW IS A TOOL THAT ALLOWS TO TRAIN MACHINE RUNNING MODELS. IT WAS USED INTERNALLY IN GOOGLE, RELEASED IN OPEN SOURCE IN 2015, WRITTEN IN C, VERY WELL OPTIMIZED TO RUN HOWELL COMPUTATIONS ACROSS HUNDRED OF OFCPU’S. MIGHT USE PYTHON TO INTERACT WITH IT. RIGHT? THE VERY INTERESTING THING SIX MONTHS AGO, MAYBE FIVE MONTHS AGO THEY RELEASED TENSA FLOW JS CMPLE OH YES. I THINK AT THE START WHEN I HEARD ABOUT THIS I WAS LIKE OKAY WHATEVER. IT’S JUST BINDINGS FOR THE TENSA FLOW YOU’VE GOT INSTALLED ON YOUR COMPUTER RIGHT? IT’S NOT BINDINGS, IT’S TENSA FLOW COMPLETELY REWRITTEN IN JAVA SCRIPT. WHY IS THAT COOL, WHY IS AT A IMPORTANT? I THINK IT’S COOL BECAUSE OF THIS YIEMENT NOW IN ORDER TO USE IN JAVA SCRIPT YOU NEED TO DID THIS. THIS IS ONLY DEPENDENCY YOUD IN. IF YOUR PROPER JOB IS A DEVELOPER, YOU’RE PROBABLY GOING TO DO SOMETHING, MAYBE ABOVE, IF YOU ARE LIKE ME YOU PROBABLY USE SCRIPT WHY TIGHTS, RIGHT? THAT’S THE ONLY DEPENDENCY YOU NEED NORMAL TO DO NEURAL NETWORKS IN JAVA SCRIPT, SPECIFICALLY IN THIS CASE IN THE BROWSER. THERE ARE A FEW THINGS CAN YOU DO WITH IT, AND YOU CAN TRAIN MODELS. EVERYTHING I SHOWED YOU BEFORE ABOUT A NEURAL NETWORK, CREATING DIFFERENT NODES, CREATING WEIGHTS AND BACK PROPAGATION, ALL THAT TRAINING MECHANISMS, THAT’S AVAILABLE TO YOU, THAT’S NOT GOOD CODE EXAMPLE, THAT’S AVAILABLE TO YOU IN TENSA FLOW JS IN THE BROWSER. A REALLY COOL THING ABOUT IT IS YOU CAN LOAD PRETRAIN MODELS. MODELS THAT HAVE BEEN CREATED ELSEWHERE, MAYBE TON AZURE PLATFORM YOU’RE CREATING SOME MACHINE LEARNING MODEL, YOU CAN EXPORT THAT, THEY HAVE TOOLS YOU CAN MAKE TO DIVERT THEM TO BE ABLE TO USE THEM INSIDE TENSA FLOW JS AND YOU CAN LOAD THEM UP IN THIS MODEL MERE. YOU CAN FIND A REPO, SECOND TIME, GOING TO GET ME ISN’T IT? THE ONE IMPORTANT ONE HERE IS MOBILE NET. MOBILE NET IS JUST A MODEL, OKAY? IT IS A MACHINE LEARN MODEL, STATIC MODEL YOU CAN LOAD, IT’S BEEN TRAINED UP TO RECOGNIZE ABOUT A THOUSAND THINGS IN THE WORLD. JUST A THOUSAND BUT IT’S STILL PRETTY GOOD, RIGHT? THIS IS THE ONLY CODE YOU NEED INSIDE THE BROWSER, TENSA FLOW THIS IS IT, YOU GET AN IMAGE, LOAD THE MOBILE NET. IT’S QUITE A LARGE LOAD, RIGHT? YOU CAN DO MOBILE.CLASSIFY WITH THE IMAGE. THAT’S ALL I WAS DOING OR HE WAS DOING WITH THAT DEMO OF HIS, RIGHT? BUT YOU SAW THE PREDICTIONS, WEREN’T THAT GREAT. THEY WERE OKAY,ISH, YOU HAVE TO MOVE MOBILE NET FOR SOMETHING ELSE, TRANSFER NET, WHICH IS PROBABLY MORE USEFUL BUT THE ACTUAL PREDICTIONS INITIALLY ARE NOT THAT GREAT. ANY GUESSES? COME ON PEOPLE, YOU MUST KNOW BY NOW.>>AZURE.>>AZURE THERE WE GO. VERY CONFUSED. SO COMPUTER VISION API. IT’S EXTREMELY RICH. EXTREMELY RICH. IT DOES SO, SO MUCH. IN FACT MY COLLEAGUES FROM DRAZNET THAT WE REPORT ON, CALLED THE ALT, THE DYNAMICALLY GENERATED ALT TEXT. THE IDEA FOR HER DEMO IS CAN YOU INCREASE ACCESSIBILITY FOR WEBSITES BY AUTOMATICALLY GENERATING THE ALT IMAGES FOR ARE VISION CHALLENGED INDIVIDUALS. IT RETURNS YOU SOME CAPTION THAT’S DESCRIBING THE IMAGE AT THE TOP. I DON’T KNOW IF YOU CAN SEE THIS. I’M NOT GOING TO TRY TO ZOOM. BLACK AND WHITE PHOTO OF THOMAS EDISON, HEY GIRL DID WE JUST SHARE ELECTRONS GENERATE COMPUTER VISION API. JUST BY LOOKING AT THE PICTURE. VERY USEFUL. THOMAS EDISON. NOT JUST A PERSON, A MALE THOMAS EDISON KNOW KNOWS, CAN FACIALLY RECOGNIZE PEOPLE, ALSO TEXT FOR PEOPLE AS WELL RIGHT? NOW ALTHOUGH THIS IS A LOT BETTER THAN MOBILE NET, IT STILL HAS ITS PROBLEMS AS WELL. SO THERE’S A COUPLE OF PEOPLE ON TWITTER ONCE YOU RELEASE, FOUND A COUPLE OF OTHER THINGS, THIS SAYS A STAR FORCE GUIDE, AN ASIAN LANGUAGE, 4 SOMETHING SO OBVIOUSLY THAT’S INCORRECT, RIGHT? HAS THIS ONE WHICH I’M NOT REALLY SURE. I MEAN — IT TECHNICALLY COULD BE. I MEAN YOU DON’T KNOW, DO YOU? IT COULD BE A STUFFED ANIMAL, PROBABLY ISN’T BUT COULD BE STUFFED ANIMALS. I THINK WE’RE HALF RIGHT, OKAY? HAS SOME PROBLEMS, PRETTY GOOD BUT IT DOES A LOT EMOTIONAL JUST TELLING YOU WHAT’S IN AN IMAGE, RIGHT? SO TO SUMMARIZE, ONE OF THE KEY THINGS I WANT TO TAKE AWAY THERE THIS DISEM OWE IS JUST INTENSE FLOW WHERE JS NO DEPENDENCIES, YOU CAN JUST DROP A SCRIPT TAG IN AND START DOING MACHINE LEARNING IN THE BROWSER. THAT’S WHAT’S SO BEAUTIFUL ABOUT IT. ARE I WISH I COULD GO INTO DEMOS WHERE I DO EXPLAIN HOW WE WOULD USE IT BUT I DON’T. IT IS A SIMPLE WAY TO USE THE AZURE IN API TO GET SOMETHING A BIT MORE ACCURATE AND POWERFUL. OH MY FAVORITE DEMO WHICH IS IMAGE TO IMAGE. SO THIS IS CREATED BUY GUY CALLED — OH MY GOD I’M GOING TO GET HIS NAME WRONG, BITIA, FROM YEMEN, FROM SAUDI ARABIA, HE BUILT THIS BASED ON A PAPER CALLED PIX TO PIX. BASICALLY HE CREATED THIS. IN THE BROWSER, YOU CAN DRAW A CAT, A VERY ACCURATE REPRESENTATION OF A CAT. ANG USING INTENSA FLOW AS, A GENERATING ADVERSARIALLY GENERATING ADVERSARIAL NETWORK. A GAN IS REALLY, BASED UPON TWO NEURAL NETWORKS THAT ARE COMPETING WITH EACH OTHER. HENCE THE WORD ADVERSARIAL. THEY ARE COMPETING WITH EACH OTHER. ONE IS CALLED THE GENERATOR, THE OTHER IS CALLED THE GENERATOR. THE GENERATOR’S JOB IS TO CREATE CATS. A REAL IMAGE OF A REAL CAT OR A GENERATEIMAGE OF A FAKE CAT. THAT’S A DISCRIMINATOR’S IMAGE. HE GOT A BUNCH OF IMAGES OF CATS, GOT THE OUTLINES OF THE CATS USING THE COMPUTER VISION TO GET THE OUTLINES LIKE A SKETCH, RIGHT? AND THEN YOU FEED IN THAT SKETCH, JUST THE OUTLINE INTO THE GENERATOR. IT WAS INITIALLY HAD RANDOMIZED WEIGHTS AND THE GENERATOR’S RESPONSIBILITY WAS TO CREATE AN OUTPUT IMAGE, RIGHT? BUT BECAUSE IT IS INITIALLY RANDOMIZED IT’S PROBABLY JUST GOING TO CREATE NOISE. THE FIRST IMAGE IS PROBABLY A PICTURE OF SOME FISA RIGHT? THEN THAT GETS FED FOTD STRAIGHT FED TO THE DISCRIMINATOR. LOOK AT THESE IMAGES AND THEN GO, LABEL THEM FAKE OR REAL, OKAY? AGAIN, THE DISCRIMINATOR WILL RANDOMIZE RANDOM VARIABLES, SO IT’S NOT GOING TO DO A GREAT JOB OF DISCRIMINATING. BUT WHAT HAPPENS IF THE DISCRIMINATOR IS WRONG THE REAL CAT PICTURE IS FAKE AND THE FAKE CAT PICTURE IS REAL IF THE DISCRIMINATOR IS WRONG THEN IT CALCULATES HOW LONG IT IS USING VARIOUS ALGORITHMS AND DOES BACK PROPAGATION. BACK PROPAGATION IS HOW DO YOU TWEAK THE BIASES OF THIS NEURAL NETWORK SO NEXT TIME AROUND THE DISCRIMINATOR GETS BETTER. AND CONVERSELY IF IT GOT IT RIGHT HERE AND THE DISCRIMINATOR WAS WRONG THE DISCRIMINATOR NOW GOES YOU NEED TO BACK PROPAGATE TO GET BETTER AT GENERATING IMAGES. WHAT YOU DO, THIS DISCRIMINATOR IS NOT GOOD AT GENERATING CAT IMAGES. OVER TIME THEY’RE BOTH GETTING BETTER AND BOTH COMPETING WITH EACH OTHER AND BOTH GETTING BETTER AND BOTH COMPETING WITH EACH OTHER, RIGHT? BOTH OF THEM ARE IMPROVING OVER TIME WHERE EVENTUALLY YOU GET OA POINT WHERE THE GENERATOR IS CREATING SUCH GOOD CAT IMAGES, ANYMORE. SO ONCE THAT’S DONE, WHAT YOU WOULD DO IS TAKE THE GENERATOR, YOU DON’T CARE ABOUT THE ANYMORE, YOU JUST WANT THE EDUCATOR. YOU LOAD OVER TFS GLOBE MODEL AND RUN AN INFERENCE MOBILE, THEN YOU CAN PASS IN NEW SKETCHES AND NOW YOU NEED TO TRY TO GENERATE A CAT IMAGE. OH, THAT’S HOW IT’S GENERATING THESE BEAUTIFUL, BEAUTIFUL CAT IMAGES, I’M GENERATING THERE. OKAY, WHAT’S THE POINT OF THIS? GENERATING CAT IMAGES? IS THAT THE POINT OF THIS? NO. THE POINT OF THIS IS PROBABLY A LOT SCARIER THAN THIS. SO THIS IS ANOTHER ALGORITHM, O VID. IT’S SHOWING VIDEOS. WHAT LOOKS LIKE REAL VIDEOS ARE GENERATING THE OUTPUTS. THAT’S COMPUTER GENERATED. THIS ONE HERE IS SLIGHTLY MORE INTERESTING. YOU GENERATE THREE DIFFERENT TYPES OF FACES. YOU’RE NOT INPUTTING ON A SKETCH BUT ON KIND OF LIKE A SEGMENTATION. KIND OF LIKE A COLORED CHART IS THE INPUT RIGHT? WHAT CAN YOU DO IS YOU CAN HAVE — CAN YOU TRAIN ON YOUR BODY AND THEN BASICALLY DO FAKE DANCING. OKAY? SHE’S NOT DANCING. I JUST TOOK SOME PICTURES OF HER BODY AND THEN THAT IMAGE IS GENERATED FROM THAT, RIGHT? SO IF YOU PASS IN A NEW VERSION OF THIS YOU CAN MAKE IT DANCE HOWEVER YOU WANT HER TO DANCE, RIGHT? THAT’S ALL FRAIK. IN ONE AS WELL. GETS TO A SEGMENTED IMAGE OF A CAR SCENE, I GUESS YOU CAN’T REMEMBER WHAT THIS ONE IS AND THAT’S IT. SO THIS ONE IS GENERATED. IT’S LIKE A BLOB COMING OUT OF THE CAR, FEW LITTLE WEIRD THINGS HAPPENING BUT IT’S PRETTY GOOD. PRETTY PRETTY GOOD. THIS ISN’T RUNNING IN THE BROWSER IN JAVA SCRIMENTS YET SCR IPTS YET BUT THE WORLD IS MOVING PRETTY FAST, RIGHT? GETS EVEN WEIRDER. THE INPUTS DON’T HAVE TO BE AN IMAGE. CAN YOU TRAIN IT WITH TEXT. THIS BIRD IS WHITE BLACK AND BROWN IN COLOR WITH A BROWN BEAK, BASED OFF THE TEXTUAL DESCRITION ABOVE. THIS FIRE HAS YELLOW PETALS WITH YELL ANTHERS IN THE CENTER, IT’S GENERATED THE IMAGES. HOW FAR, PUT A FORM WITH IMAGES IN IT, ONE FORM SHOULD BE A DAY FIELD AND HAVE A SUBMIT BY THE BOTTOM? I DON’T THINK TOO FAR. SO GANS ARE GENERATIVE. THEY TAKE FAR MORE COMPUTER-TRAIN THAN A TRADITIONAL NEURAL NETWORK, RIGHT? BUT THE GENERATOR MOLE MODEL,-EXPORTED AND USED IN THE BROWSER. INTERESTING USE CASES THERE FOR US. JUST KIND OF A FEW THOUGHTS FROM ME BEFORE I FINISH OFF. SO ONE QUESTION I’VE BEEN ASKING ME FOR A WHILE NOW IS WHERE DOES JAVA SCRIPT FIT IN TO THIS AI LEARNING SCAPE, A QUESTION I’VE BEEN ASKING MYSELF FOR A YEAR NOW. WHAT’S HAPPENING IN THIS SPACE, ARE WE GOING TO BE IGNORED AND TAKEN OVER AND OTHERS ARE GROG ASK, WHAT IS GOING TO TAKE OVER? I SEE WHERE THERE’S A MACHINE LEARNING JAVA SCRIPT ENGINEER, WHEN WE MEET UP AIZ JAVA SCRIPT LONDON, WE EXPECTED ONLY JAVA SCRIPT PEOPLE TURNED UP BECAUSE WE WERE JAVA SCRIPT PEOPLE. YOU WANT TO LEARN JAVA SCRIPT, OKAY, THEY ARE REALLY, REALLY GOOD AT BUILDING MODELS BUT THEY’RE NOT VERY GOOD AT THEM TAKING THOSE MODELS AND BUILDING AN APPLICATION OUT OF THEM AND DOING SOMETHING WITH IT. THAT’S WHAT WE’RE REALLY GOOD AT. I SEE THERE’S A ROLE IN THE FUTURE WHERE YOU’RE GOING TO NEED TO KNOW ENOUGH ABOUT AI AND ENOUGH ABOUT MACHINE LEARNING, TAKE THESE MODELS AND RUN WITH IT. MAYBE NOT SIT AND READ PAPERS ALL DAY UNLESS YOU LIKE TO. I DON’T. AND SO FINAL FEW THOUGHTS, IF YOU ARE INTERESTED IN LEARNING A LITTLE BIT MORE HOW TO DO BUILD AN APPLICATION ON THIS ESPECIALLY USING AZURE, I HAVE SOME — HAS ANYONE HEARD ABOUT THE MS LEARN ANNOUNCEMENT, IGNITE? YOU CREATE A WHOLE NEW LEARNING PLATFORM, IT’S GAMIFIED, IT’S FANTASTIC. THE EMOJIIFYER LIVES, NOW, YOU CAN LEARN HOW TO CREATE IT, AND YOU’RE GOING TO GET 1800 EXPERIENCE POINTS IF YOU FOLLOW THIS MODULE, IT’S GOING TO BE AVAILABLE ON THE MSN PLATFORM. NOT QUITE THERE YET, I WAS UP TO 1 A.M. TRYING TOO GET IT. BUT IT WILL BE, TO FIND OUT MORE, FINAL FINAL FINAL THING, IF YOU ARE INTERESTED FOR ANY OTHER SESSIONS TODAY, I DO RECOMMEND THESE TWO. THE TOP ONE IS MY BOSS, JOHN PAPA. IF YOU KNOW JOHN PAPA HE’S PRETTY BIG IN THE ANGULAR SPACE. AND FULL STACK NO JS APPLICATIONS WITH VS CODE. WHO USES VS CODE, WOW EVERYBODY. BRIAN IS THE ONE WHO MAKES THE MONTHLY VIDEOS, HE’S GOT AN AMAZING SESSION AT 2 P.M, VS CODE TIPS AND TRICKS. IF YOU ARE USING VS CODE, IT GOES VERY FAST. THANK YOU FOR YOUR TIME. FOLLOW ME ON AT WHICH TIMER, I’M

Leave a Reply

Your email address will not be published. Required fields are marked *