December 2018
Intermediate to advanced
268 pages
8h 23m
English
The MNIST data is a beautiful dataset because it is simple and well-known. Everyone has toyed with the MNIST dataset, and it is quick to download. For our purposes, we are going to load the MNIST data in the trainer as an example. Within this class, there's also some functionality to allow us to only use one number if we would like to build a generator that is good at one number instead of them all:
def load_MNIST(self,model_type=3): allowed_types = [-1,0,1,2,3,4,5,6,7,8,9] if self.model_type not in allowed_types: print('ERROR: Only Integer Values from -1 to 9 are allowed') (self.X_train, self.Y_train), (_, _) = mnist.load_data() if self.model_type!=-1: self.X_train = self.X_train[np.where(self.Y_train==int(self.model_type)) ...Read now
Unlock full access