if not os.path.exists(args.output): os.makedirs(args.output) print('-------------') print('BATCH : {}'.format(args.batch)) print('EPOCH : {}'.format(args.epoch)) print('ALPA : {}'.format(args.alpha)) print('DROPOUT : {}'.format(args.dropout)) print('Load Weights?: {}'.format(args.weights)) print('Dataset : {}'.format(args.dataset)) print('OUTPUT : {}'.format(args.output)) print('-------------') # TODO: abstract method to normalize speed. df_train, df_val = getDataFromThunderhill(args.dataset, split=True, randomize=True, balance=True) print('TRAIN:', len(df_train)) print('VALIDATION:', len(df_val)) print(df_train[['speed', 'throttle', 'brake', 'accel']].describe()) model = NvidiaModel(args.dropout) print(model.summary()) # Saves the model... with open(os.path.join(args.output, 'model.json'), 'w') as f: f.write(model.to_json()) try: if args.weights: print('Loading weights from file ...') model.load_weights(args.weights)
if not os.path.exists(args.output): os.makedirs(args.output) print('-------------') print('BATCH : {}'.format(args.batch)) print('EPOCH : {}'.format(args.epoch)) print('ALPA : {}'.format(args.alpha)) print('DROPOUT : {}'.format(args.dropout)) print('Load Weights?: {}'.format(args.weights)) print('Dataset : {}'.format(args.dataset)) print('OUTPUT : {}'.format(args.output)) print('-------------') # TODO: abstract method to normalize speed. df_train, df_val = getDataFromThunderhill(args.dataset, args.output, balance=False) print('TRAIN:', len(df_train)) print('VALIDATION:', len(df_val)) print(df_train.describe()) model = NvidiaModel(args.dropout) print(model.summary()) # Saves the model... with open(os.path.join(args.output, 'model.json'), 'w') as f: f.write(model.to_json()) try: if args.weights: print('Loading weights from file ...')