tensorflow 썸네일형 리스트형 [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.. 더보기 Self-driving car that learns from human drivers - part 2 In the previous post (see 2017/07/31 - [TORCS] - Self-driving car that learns from human drivers - part 1), I show you the racing cars that drive according to a simple driving policy. The driving policy described in the post consists of several algorithms, each utilizes the information about the status of the car and the road. For example, the anti-collision breaking system utilizes 'the speed o.. 더보기 [tensorflow] About using trained NN in C++ ** tensorflow에서 학습한 network를 C++에서 사용 ** In the previous post (visit 2017/07/18 - [Deep Learning] - [tensorflow] how to load and use CNN in C++), I described how to load the CNN trained by using tensorflow and how to use the CNN in C++. In the example, I assumed that the CNN output is of size (1x1). The following example shows how to access the output of CNN whose size is greater than (1x1). Enj.. 더보기 [tensorflow] how to store/save/read float type numpy array as tfrecord ** float 타입 변수 tfrecord로 저장하기 ** Tensorflow.org recommends saving your training data in the format of tfrecord. Many examples can be found on websites. (See my previous post 2017/07/18 - [Deep Learning] - [tensorflow] How to make tfrecord file for training.) Unfortunately, however, most of the examples are dealing with saving images/labels of data type uint8, int64. In this post, I am going to d.. 더보기 End-to-end learning for autonomous driving TORCS, the open racing car simulator, is an interesting tool for A.I racing. (If you want to know how to install it, see 2017/07/18 - [TORCS] - How to install TORCS on ubuntu 16.04LTS). One can make a racing robot that runs on TORCS tracks according to his/her own driving policy. (Very specific information such as speed, position, track info. etc. can be obtained in real time!! So you can make a.. 더보기 [tensorflow] How to read a bmp file and feed it into CNN ** BMP, JPG 등 이미지 파일 읽어서 feed_dict 형식으로 CNN 입력하기 ** Assume you trained a CNN which takes RGB image of size (height, width, channel) as an input. After loading the trained CNN graph from, you may want to feed a test image into the CNN and see the inference result. // CODE ///////////////////////////import tensorflow as tf import numpy as np import os import skimage.io as io from skimage import tr.. 더보기 [tensorflow] How to load a mini-batch from tfrecord and feed it to CNN ** tfrecord 파일로 부터 random mini-batch 만들고 CNN에 feed_dict 형식으로 입력 ** step1) load a mini-batch from tfrecord by tf.train.shuffle_batch()step2) use tf.placeholder_with_default() to convert the tensor (of size mini_batch_size) to numpy array // PSEUDO CODE ///////////////////////////////////import tensorflow as tfimport osimport numpy as npimport network as net def _get_image_and_label(param): ## dir.. 더보기 [tensorflow] How to random flip an image and its corresponding label ** tensorflow graph에서 영상과 해당 label 값을 동시에 random filp ** import tensorflow as tfimport osimport numpy as npimport network as net def _do_nothing(image, label): return image, label def _random_true_false(): prob = tf.random_uniform(shape=[], minval=0., maxval=1., dtype=tf.float32) predicate = tf.less(prob, 0.5) return predicate def _image_and_label_flip(image, label): image_flip = tf.image.flip_l.. 더보기 [tensorflow] How to make tfrecord file for training ** training data image들로 부터 tfrecord 만들기 ** ** Assume you have saved 100 images at 'file_path'. The corresponding labels are stored in label.csv file. That is, one integer value label per RGB image. // PSEUDO CODE //////////////////////////////////////import tensorflow as tfimport something def _bytes_feature(value): return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) def _int6.. 더보기 이전 1 2 다음