Placeholder Image

字幕表 動画を再生する

  • what is going on already.

  • And welcome apart seven of the highlight to tutorial Siri's as well as part four of the Deep Learning in Hallinan Siri's.

  • So, uh, in the tutorial leading up to this point, we built a bought two randomly play against itself, basically taking random choices.

  • Uh, and then we took the winner and save that to training data.

  • So we trained in a I to, uh, basically play like the random winners.

  • And now we're ready to do is take our A I the actual bought the hell I bought and have it play as whatever the deep learning classifier says.

  • Basically, based on the input input.

  • So, uh, in order to do that, let's go ahead.

  • And, uh, I'm going to copy.

  • I guess we'll just copy my by it was copied this one copy paste, and then I'm gonna leave this one called just straight my But mostly because, well, I'll be submitting it in this tutorial, so I just wanted it has to be called my body.

  • So, um, so we're gonna do is, uh we're going to open this and right away.

  • What I'm gonna I'm gonna do here is do this.

  • So we can actually.

  • So one of the things that we will do is will compete, uh, locally and just make sure it works, and then we'll go so and upload it.

  • Okay, Sonny's fit this to screen real quick.

  • Cool.

  • Okay, so there's only a few changes that we need to make and really, the crux of this entire A I is going to exist here.

  • This pick a new plan.

  • So if the ship doesn't have a plan or we want to change our plans, the aye aye is going to take over this sector and that's it said Super simple.

  • We do need to make a few imports in such and such, but it's pretty simple.

  • So let's go ahead.

  • Import care, Ross.

  • We're gonna import tensor flow as TF and then from KERA stop models import lewd model.

  • And then what we want to go ahead and do is, uh, due to, um, so tense airflow and care us both output, uh, some stuff to your do some standard output and how, like uses that output to communicate.

  • And so what we need to dio and clearly three Houston like line number or output number or something.

  • So what we have to do is actually silence, silence the outputs of tensorflow.

  • So I'm just copies over, as always, links in the description for this code.

  • But basically, that's gonna do is gonna set that log level 2 99 so hopefully doesn't log anything.

  • And then also, uh, we're gonna set that verbosity to Onley report errors, so hopefully it won't tell us anything about what it's doing.

  • Um, so yeah, cool.

  • Now, what we want to do is load a model, so same model equals load underscore model.

  • And we're basically gonna load exactly what we had before, but at least for now, I'm just gonna copy this, So copy that lips of this back up here.

  • Boone, we wanna load that model.

  • That's the one that we just trained.

  • Then, um, also, I guess I'll just I'm just You don't have to have this bit of code, but I'll explain it anyway.

  • If, in fact, actually, this would probably be done basically here.

  • I would just do it immediately.

  • Or maybe after this set log level.

  • Not really sure which wouldn't should come first.

  • Nash, I'm trying to decide.

  • This is only gonna be used locally, though, so it probably doesn't matter Either way, I'm gonna put it here, though I think that makes most sense anyway, what this is gonna do.

  • The main issue here is we want to set the memory fraction.

  • So if you want to run locally, um and you would have liked to a eyes competing against each other.

  • This will say, each day I can use a 40% of your GP you is what I used to So I could train to a eyes competing against each other, uh, and not and then also still use my computer.

  • So basically, it was only using 80% But normally, if you didn't have this code here, um, the first a I is gonna basically load its model, and it's gonna attempt to use 100% of your jeep.

  • You It's gonna attempt to use all that it can, which is a problematic when you attempt to load a second model home to that GPU.

  • Okay, so now we're gonna go down to that pick a new plans.

  • So I'm gonna search pick a really new plans, Okay.

  • Oh, why is planning quotes?

  • Uh okay.

  • Whatever.

  • Now Um, yes, I'm just copy and paste from the text based version.

  • So what this is going to do is it's going around that input vector, basically, each item because it goes out to, like, the super high precision That's not necessary.

  • Um, and then the output vector is model that predicts output.

  • Max is just where that art max is because model that predict is gonna not produce.

  • Well, we could round it.

  • But anyway, it's gonna produce something more like this.

  • Like I'm trying make sure I sort of him correct.

  • And then I don't know.

  • Okay, something like this is gonna be the output vector.

  • It's not gonna be a beautiful 010 or something like that.

  • That's not gonna happen.

  • So then we'll get the arc.

  • Max will say, Okay, they aren't Max Victor.

  • And then we set the arcamax equal to one.

  • The output vector is Art Max factor.

  • We logged the information and we save it.

  • Okay, but basically, the model is picking the output vector, and that's it.

  • Uh, that should be all.

  • So let's go ahead and run it real quick and see what we screwed up safely.

  • Move this over it's Open this up.

  • Please.

  • Just work, Please.

  • Dane Git!

  • And now we get to go through the lovely, lovely, just super enjoyable debugging process of highlight.

  • So we got set session not defined so clearly.

  • Uh, we need to import something more from tens of flu.

  • I really just wanted to show you guys that as an example of what you needed to do to run it locally, But clearly, um, it's something we need.

  • I forget what it is.

  • I don't know if I could just from tensorflow import set session.

  • Let's see, T f set session.

  • Let's see if I can get away with that.

  • If not, um, from tense or flow Import Said session.

  • No, no, that's probably about you.

  • I don't want to load up on an idol, Mrs.

  • Run that really quickly and see if that saves us.

  • If that doesn't Did not, um, deposits.

  • I wanna get the right right information for you.

  • So give me one second.

  • Okay?

  • So actually, it's from Kara Ross to do it for Caris, I guess, But anyway, from kera, stop back in tensorflow underscore Back end import set session and let me see if that works.

  • And then, um, because it's important to run it locally eventually.

  • If you want to continue that iterative process, Um, don't tell me I had another error.

  • Hold on.

  • I'm gonna get rid of that just because it might be the order, but so still another air.

  • This is frustrating.

  • Ah, Charles.

  • One.

  • Right.

  • Okay, list index outta range.

  • What would be do we delete something that we should have deleted from the model?

  • Possibly.

  • Ah.

  • So I guess I'll go ahead and leave that there.

  • That's prying on our problem.

  • Uh, this one's having a list index I'd arranged to Who would be hitting?

  • Mmm.

  • It's really irritating because I ran both of these guys versus each other not too long ago.

  • So I know that the my bought one works that works or should work.

  • Yep.

  • So how you gonna tell me that doesn't want how come they both had a list into exile range?

  • That doesn't make any sense.

  • I appreciate this.

  • Trying to film a tutorial here.

  • Okay, wait.

  • It's still from tensorflow import set session.

  • This one had just ran just now.

  • Why is that still that's not the air.

  • Surely because we're not doing that anymore.

  • Did I leave that import?

  • I sure did.

  • Okay.

  • Okay.

  • Well, it works.

  • Glory.

  • That's glory.

  • All right.

  • So, Charles E.

  • I won.

  • No more errors.

  • Let's bring this down.

  • Let's go ahead and submit that and see how it looks.

  • Er, is this it?

  • Yeah.

  • So replay the file.

  • Not what I intended to do.

  • Go back.

  • Come on.

  • They're real.

  • So, Charles one is R A I is pretty brutal.

  • See you.

  • All right.

  • Not bad.

  • Not bad.

  • Looks like a pretty good, eh?

  • I to me.

  • Okay, so let's say we're happy with that.

  • We're like, OK, Yeah.

  • Good.

  • Let's push that.

  • So what I'm going to do now is looks good.

  • So what changes would we need to make from here?

  • So, first of all, we've already done that caress back and part, so that's not a problem.

  • Uh, the other change we want to make is we need a language file.

  • Let me pause for one more second to make sure I get this right.

  • Okay.

  • So just wanted to make sure, but so So what we have here is basically because my bought dot pie is a dot pie, but the language is meant to be, actually ml because we're using a machine learning script instead.

  • Um, so to package this up, we also will want tohave a gonna delete this.

  • Just clean this up so we can see things better.

  • Um, we wanna have a file called Language, so I'm gonna call this all caps language, and then let's open it up, uh, to sublime.

  • And we're gonna just call the language ml.

  • Yeah, like that of the fire.

  • So close that.

  • And then to package this all up, we need the language, the baht, the model that we're importing, and then the highlight stuff because we're using that as well.

  • And then we can send that to compress folder.

  • I'm gonna call that submission, and now to submit it, there's a couple things we want to do.

  • One thing we want to do is probably good or actually think we want to go to edit profile or maybe settings.

  • Yes.

  • So, in settings, you'll want to enable GPS for your current, but that we don't time out s o go ahead and just hit that drop down and choose.

  • Yes.

  • If you don't have that already and then you can go to save already had that.

  • They're so I'm not gonna save it again.

  • Now, what you can do is go to submit a body and we're gonna submit that new submission there.

  • So that's version 24.

  • I just remember that.

  • So if we start, if we start having games and no errors and it says version 24 it worked.

  • Okay, so it says we'll start playing games of them.

  • 15 minutes should be pretty quickly.

  • Um, Mrs Refreshed, if it comes up pretty quickly or not, what I'm gonna do, I think is a deposit.

  • Until I start playing games or airing out, we'll see which one happens.

  • All rights.

  • And we are playing games that turns air greater than one.

  • So it looks like we're doing all right.

  • We have one game that we lost in them.

  • One game that we won.

  • Let's go ahead and check those out real quick.

  • Like I just takes his sweet time.

  • Probably cost us the game there.

  • We should fire him.

  • This guy's a savage.

  • All right.

  • Uh, and then this one, we actually win, and we didn't move very quickly.

  • We sat there for a little bit interesting I'm not sure if this guy's just mining planets or what?

  • Cool.

  • Okay, so he's playing.

  • We'll see where he kind of settles.

  • Um, I've kind of been poking around.

  • You're seeing how we do.

  • Um, and at least obviously this one, we just didn't have very many games under our belt there.

  • There's a lot of parameters that you can change, but actually 11 of the A I that I trained only played 40 games and cuts up down in 9 29 Obviously, that's just a by chance probably.

  • Um, but anyway, this one, no problem.

  • I'm not really sure where I expect this one to settle.

  • Um, hopefully hopefully somewhere in the 1000.

  • But it just depends because we didn't really train that many matches.

  • So, for example, just to show you as well, um, So you could compete now locally, against yourself with the data creator, and then using either the percentage share, maybe do the aye Aye.

  • Versus the, uh um, the default like random, But, uh, I wanted to show you a picture.

  • Not sure it's gonna happen.

  • I can't seem to get this the picture.

  • Like zoom in when I zoom in on this page.

  • It's annoying.

  • Anyway, I just wanted to show a couple examples.

  • So basically, after I trained, um, you know, with random models after a little over 5000 steps, obviously the you know, the split was about 50 50.

  • And then after I trained the player to play, um, you know, versus itself basically are basically, this is a I versus the random bought, I guess the way I won 66% of the time after 100 matches, so definitely had some improvement.

  • Now, the other thing to pay attention to is like this.

  • This model right now was trained on one V one matches, so I actually forgot about that.

  • So that's probably why we'll probably stay pretty badly ranked because it's really only good against one V one.

  • So probably if we go here.

  • Um, let's see what he does.

  • But I'm guessing he's just too aggressive, like he probably forfeits his position.

  • We well, he just killed himself there.

  • That was his main mistake.

  • But as you can see, he's going in for the attack like immediately when really, we should be mining some planets.

  • But, um, that's kind of what happens when you're playing or when you Ah, start off.

  • Oh, if you only trained on one V one, it's probably gonna create a pretty aggressive Aye.

  • Aye, And these guys are not even good.

  • Come on.

  • Anyway, um, that's all for now.

  • Like I said, there's so many things that we can modify and change and work on and all that, Um, another, probably the biggest one is just also include Cem four player matches, if not always have four player matches or something like that.

  • But anyways, um, just there's so many things that we could tweak and change.

  • And like I said, one of the other things I would probably do is add a flea option.