def _init_caffe(cfg):
 import caffe
 np.random.seed(cfg.RNG_SEED)
 caffe.set_random_seed(cfg.RNG_SEED)
 caffe.set_mode_gpu()
 caffe.set_device(cfg.GPU_ID)

def _init_caffe ( cfg ) : import caffe np . random . seed ( cfg . RNG_SEED ) caffe . set_random_seed ( cfg . RNG_SEED ) caffe . set_mode_gpu ( ) caffe . set_device ( cfg . GPU_ID )
initialize pycaffe in a training process .