Tao's blog

Learn something everyday.

Setup-and-home-media-server-using-docker

This article records the steps on how to setup home media servers using emby. About Emby Emby provided servers/clients to share the medias across your different devices. Which is convient for ho...

Tensorflow Tutorial 5, Using TensorFlow dataset APIs

This artical shows how to use tf.data.DataSet apis to do preprecossing for images in DL on facenet The oringinl facenet implementation using tensorflow.python.ops.dataflow_ops.FIFOQueue, which is...

MPI and gRPC, two tools of parallel distributed tools

MPI MPI is short for Message Passing Interface, widely adoption at HPC for parallel computing. But it’s relatively low level APIs. Here is an example of MPI tutorial website, http://mpitutorial.c...

Tensorflow Tutorial 6, Using TensorRT to speedup inference

Workflows to use TensorFlow-TensorRT (TF-TRT) There are three workflow to use TF-TRT, based on the Tensorflow model format. They are SavedModel, metagraph/checkpoint, frozen_graph. TF-TRT workfl...

Cuda Streams Context MPS

Cuda 编程模型中存在不同的并行度. 从cuda thread到block,到grid,再到cuda stream,然后上面是cuda context。以及cuda MPS技术。 Block/Grid block/grid都是针对一次launch kernel中的不同cuda thread的, cuda programmding model不保证一个kernel中的不同thread的执...

How to extract weights from a frozen tensor flow graph pb file

import tensorflow as tf import sys ## In tensorflow the weights are also stored in constants ops ## So to get the values of the weights, you need to run the constant ops ## It's a little bit anti...

OS concept memory management

MMU的作用与演化 在一个多进程的系统中,由于各个进程需要共享同一个物理内存,但是并不共享逻辑内存。所以需要由硬件和操作系统来完成,内存的管理,使得进程在能够共享同一个物理内存的基础上能够有独立的地址空间,不被别的进程影响。 MMU:CPU里面的一种专用硬件,负责将进程的逻辑地址转换成实际的物理地址。MMU需要与操作系统配合来完成内存的管理。例如:在一个多进程的操作系统中,操作系统进...

Tensorflow Tutorial 4, Fix memory leak issue

Problems and soloving method Orignally, I use the code like the following code. I found that the memory will increase as the training goes on, and finally my computer will run out of memory and st...

Modern C++ -- Variadic Templates

Synopsys 培训时,候捷老师讲解了 “可变参数模版”这一个课题。 本文记录了两个例子来说明可变参数模版的用法。 可变参数模版函数 //这个不接受任何参数的函数是必须的, //因为下面接受人任意个参数的函数的递归调用最终都会调用到此函数 //如果不定义,直接编译无法通过 void print() { } // T 为一个, ...Types 为一包 // 每次处理...

Tensorflow Tutorial 3, Visualizing your model and training

# coding: utf-8 import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import os x_data = np.linspace(-np.pi, np.pi, 100)[:, np.newaxis] noise = np.random.normal(0, 0.02, x_da...