본문 바로가기

tensorflow

[tensorflow] how to load and use the saved trained network in python ** tensorflow에서 미리 저장한 CNN로드하고 사용하기 **** See '[tensorflow] how to save trained network' first. // PSEUDO CODE ////////////////////////////////////////import tensorflow as tfimport something # save trained netnet_dir = 'path_to_saved_trained_network'image_path = 'path_to_input_images' with tf.Session() as sess: # Step1) Load graph from meta file (meta file contains the graph that I had defined be.. 더보기
[tensorflow] how to freeze trained network (make one pb file) ** 학습한 CNN graph 저장하기 - C++에서 사용하기 위해 **** See '[tensorflow] how to save trained network' first! ** Download the attached file ' freeze_graph.py'** The following code will create graph.pb at net_dir. This pb file will be used at c++. ** To see how to use graph.pb in c++, visit '[tensorflow] how to load and use CNN in c++' /// CODE /////////////////////////////from __future__ import absolute_impo.. 더보기
[tensorflow] how to save trained network ** tensorflow에서 학습한 network 저장하기 **** Following pseduo code will create 5 files at the location "net_dir" 1) checkpoint_state2) input_graph.pb 3) saved_checkpoint-0.data-00000-of-000014) saved_checkpoint-0.index5) saved_checkpoint-0.meta /// PSEUDO CODE /////////////////////////////////////////////////////////////////////////import tensorflow as tfimport something # path where trained network to.. 더보기
[tensorflow] how to load and use CNN in C++ ** tensorflow에서 학습한 network load해서 C++에서 사용하기 ** #include #include #include #include #include #include #include "tensorflow/cc/ops/const_op.h"#include "tensorflow/cc/ops/image_ops.h"#include "tensorflow/cc/ops/standard_ops.h"#include "tensorflow/core/framework/graph.pb.h"#include "tensorflow/core/framework/tensor.h"#include "tensorflow/core/graph/default_device.h"#include "tensorflow/core/graph/.. 더보기
[tensorflow] How to install pycharm+anaconda+tensorflow(gpu) on window10 ** 윈도우10에서 파이참, 아나콘다, tensorflow 설치 ** Background: windows10-64bit, gtx-1070, CUDA8.0, cudnn8.0 step1) download an anaconda installation file from the website and install https://www.continuum.io/downloads step2) download a pycharm installation file from the website and install https://www.jetbrains.com/pycharm/ step3) run pycharm and create an empty project. step4) go [file]-[settings]-[Project.. 더보기