Training Neural Network - Python AI in StarCraft II tutorial p.11

preview_player
Показать описание
Welcome to Part 11 of the creating and Artificial Intelligence bot in StarCraft II with Python series. In this tutorial, we're going to be working on actually feeding our training data through our network. Because our training data is sufficiently large, we need to take extra measures to do this smoothly.

Рекомендации по теме
Комментарии
Автор

In Keras there are two methods that can be used to load batches directly from disk:
- model.train_on_batch(x, y) - trains a individual batch on some x and y data
- - works the same as the fit method but takes a generator that outputs pairs x, y. This is the same method that model.fit() uses internally.

KylePiira
Автор

Hi sentdex,
To answer your question at 16:40, I would normally import method to do split my dataset into training and testing sets. Hope that helps!

HuayiGao
Автор

OMG you are amazing I am learning python and your old tutorials are so helpful thanks!

Sedwards
Автор

Thanks for making this tutorial! I cant wait to see the final result on the AI performance

ConexionFuturist
Автор

At 16:30 is your train_data a "python list" or an "np array"? You can only do multi-indexing for np arrays. So just convery train_data to np array before multi-indexing.
Like
train_data = np.array(train_data)
then you can
x_train = train_data[:, 1].reshape(-1, 176, 200, 3)

kwea
Автор

a tear shed for those with only 4GB of gpu ram (GTX970), i had to reduce my test_size and batch_size to 50/64 respectively to get it to run

great vid, as always!

Cyphlix
Автор

I had the EXACT same problem with too big datasets for RAM when using a 3d convnet for video classification and I had to read in 3d numpy arrays. Keras can actually fit from a generator, and so I wrote one if you search for "github jphdotam keras generator"

jphoward
Автор

This is probably the easiest hack for class balancing that i have ever seen lol

micahchurch
Автор

Hello, I'm getting ImportError: Could not find 'cudart64_90.dll'. but sentdex didn't mention this in the video. Did I miss a step somewhere or do I need to download something different. Any help is greatly appreciated

chessmaster
Автор

Were you still going to use a genetic algorithm to train the network, or have you just not gotten to that step yet? I'm fascinated by the potential advantages a genetic algorithm has over gradient descent.

matthewburson
Автор

isnt it more efficient to play against same version of the bot for the training instead of computer?

Thoumizzi
Автор

You can make a custom generator and use the fit_generator method, in order to train on data 'from disk'.

fmbahrt
Автор

The self.flipped portion of my train_data is a (168, 168, 3) array, whereas yours is able to be reshaped into a (176, 200, 3), any idea why? I copy-pasted both the bot and NN sections of code from your site (changes to directories of course) to the same effect.
Edit: I found my issue, it appears that since different maps have different sizes, maps of sizes other than AbyssalReefLE will throw an error when numpy tries to resize the array.

charlesriedel
Автор

Is it possible to see what the API you use to let the bot play the game does, or how it works? I used to play sc2 and i really like your videos, but i dont get how the bot selects units, builds and stuff like that. ( i have no coding expirience to look myself and understand it... )

followMLS
Автор

If at the end you want to save the model, you can add another callback to the call back list besides tensorboard: keras.callbacks.ModelCheckpoint, and this could help you to save the best model weights instead of the last one.

adowaconan
Автор

i keep getting this error
```
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\dave\Desktop\Starcraft2bot\dudesDEEPLearningBot.py", line 1, in <module>
import keras
```

davedumas
Автор

Do you have a pytorch implementation of this?

vladimirtchuiev
Автор

How I suffered from 5:10 to 13:48. I simply couldn't make the missing underscore unseen.

PhrNoBr
Автор

Did I hear correctly that you're only passing in game data that was the result of a victory?

trevorseitz
Автор

Fit_generator (function) in the Sequential doc in the Keras api docs ? (I need to check my bomberman NN project on github...)

GGdu