본문 바로가기

Deep Learning

Very simple RNN example 1. Notation I_{t} : input vector to RNN at time t S_{t} : vector that represents RNN state at time t (also called hidden state) O_{t} : output vector of RNN at time t W_{1}, b_{1} : weight matrix and bias vector to be trained from data, which determine the next state vector of RNN given the current input and previous state vectors. W_{2}, b_{2} : weight matrix and bias vector to be trained from .. 더보기
[KERAS] how to install keras with tensorflow+anaconda+pycharm on windows10 Keras is a collection of libraries for easy use of tensorflow and Theano. In this post, I will exlain how to install keras on windows10 with 'tensorflow + anaconda + pycharm'. You need to visit 2017/07/18 - [Deep Learning] - [tensorflow] How to install pycharm+anaconda+tensorflow(gpu) on window10 first. 1) After installing pycharm + anaconda + tensorflow(gpu) As all of you know, Anaconda provide.. 더보기
Experimental results of "Driving experience sharing method for end-to-end control of self-driving cars" 1. Training data examples from TORCS* We collected the front-facing camera images from TORCS while a racing robot drove on 10 tracks. The driving information was collected at 10Hz. (a) normal driving (b) the experience of returning to the lane center when a car is out of its lane. 2. Driving performance evaluation results* We collected the front-facing camera images from GTAV while each CNN drov.. 더보기
[tensorflow] training specific variables tvars = tf.trainable_variables() g_vars = [var for var in tvars if 'g_' in var.name] g_trainer = tf.train.AdamOptimizer(0.0001).minimize(g_loss, var_list=g_vars) 더보기
[tensorflow] batch normalization code def batch_norm(x, n_out, phase_train, scope='bn'): """ Batch normalization on convolutional maps. Args: x: Tensor, 4D BHWD input maps n_out: integer, depth of input maps phase_train: boolean tf.Varialbe, true indicates training phase scope: string, variable scope Return: normed: batch-normalized maps """ with tf.variable_scope(scope): beta = tf.Variable(tf.constant(0.0, shape=[n_out]), name='bet.. 더보기
[image pre-processing] image normalization def image_normalization(image_batch, batch_size): for i in range(0, batch_size): # get i-th image from the input mini-batch tmp = image_batch[i, :, :, :] # calculate std and mean of the image std = np.sqrt(np.var(tmp.astype("float32"))) + 0.00000001 mean = np.mean(tmp.astype("float32")) # normalization image_batch[i, :, :, :] = (tmp.astype("float32") - mean) / std return image_batch 더보기
[data augmentation] random image flip left/right def _random_flip_left_right(image_batch, label_batch, batch_size): for i in range(batch_size): if (np.random.rand(1) < 0.5): sign = -1.0 tmp_image = np.fliplr(image_batch[i, :, :, :]) else: sign = 1.0 tmp_image = image_batch[i, :, :, :] tmp_steer = label_batch[i, 0] image_batch[i, :, :, :] = tmp_image label_batch[i, 0] = sign * tmp_steer return image_batch, label_batch 더보기
[tensorflow] how to use the pre-trained network ** pre-trained network를 사용하여 inference하기 **** transfer learning ** In this post, I will show you how to use the pre-trained network, which is saved in the format of matfile.Acturally, the matfile just contains the filter weights of the convolutional layers and fully connected layers of the trained network as numpy arrary. So you need to know the structure of the network in advance. This post is .. 더보기
[tensorflow] how to save the filter weights of the trained network as matfile ** 학습한 network를 읽어서 mat 파일 형식으로 저장하기 ** ** transfer training In this post, I will show you how to save the filter weights of the trained network as mat file format.First, you need to read the following post. 2017/07/18 - [Deep Learning] - [tensorflow] how to save trained network2017/07/18 - [Deep Learning] - [tensorflow] how to freeze trained network (make one pb file)2017/07/18 - [Deep Learning.. 더보기
[TORCS] End-to-end learning for highway assistance driving system In the previous post (2017/07/28 - [TORCS] - End-to-end learning for autonomous driving), I trained a Convolutional neural network that produces a steering wheel angle command from a front-facing camera input image. In this post, I will show you a self-driving car that keeps the current lane position while keeping a constant distance from the closet car ahead. The input to the CNN is a (normaliz.. 더보기