mxbi / carnd-behavioural-cloning Goto Github PK
View Code? Open in Web Editor NEWMy submission for Project 3 of the Udacity CarND
My submission for Project 3 of the Udacity CarND
hello michel how are you, hoping you're fine,
about your generator, when you did that:
chunk = df.sample(n=batch_size).reset_index(drop=True)
the model has every time it can take a single image several times in a single epoch, is it not going to overfit ?
(it can't take all images in the training Set)
class DataGenerator(Sequence):
def init(self, X_train, labels, batch_size=32, aug=False, shuffle=True):
self.aug = aug
self.batch_size = batch_size
self.labels = labels
self.X_train = X_train
self.shuffle = shuffle
self.on_epoch_end()
def __len__(self):
return int(np.floor(len(self.X_train) / self.batch_size))
def __getitem__(self, index):
'Generate one batch of data'
# Generate indexes of the batch
indexes = self.indexes[index*self.batch_size:(index+1)*self.batch_size]
X, y = self.__data_generation(indexes)
return X, y
def on_epoch_end(self):
'Updates indexes after each epoch'
self.indexes = np.arange(len(self.X_train))
if self.shuffle == True:
np.random.shuffle(self.indexes)
def __data_generation(self, list_IDs_temp):
#idx = np.random.choice(len(X), batch_size, replace=False)
batch = pd.DataFrame(data=self.X_train[list_IDs_temp], columns=['center', 'left','right'])
batch['steering'] = pd.Series(self.labels[list_IDs_temp])
X, y = load_and_augment(batch, trans=self.aug)
# The augmentation has created thousands of images from our selected 32
# Here, we select a random few to be in the actual batch
idx = np.random.choice(X.shape[0], self.batch_size, replace=False)
X = X[idx, :, :, :]
y = y[idx]
return X,y
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.