python类GPU_ID的实例源码

train_faster_rcnn_alt_opt_doubledb.py 文件源码 项目:py-faster-rcnn-dockerface 作者: natanielruiz 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
train_faster_rcnn_alt_opt.py 文件源码 项目:py-faster-rcnn-dockerface 作者: natanielruiz 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
nms_wrapper.py 文件源码 项目:FRCNN_git 作者: runa91 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
nms_wrapper.py 文件源码 项目:jenova 作者: dungba88 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        from nms.gpu_nms import gpu_nms
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        from nms.cpu_nms import cpu_nms
        return cpu_nms(dets, thresh)
nms_wrapper.py 文件源码 项目:FastRCNN-TF-Django 作者: DamonLiuNJU 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
train.py 文件源码 项目:faster-rcnn-scenarios 作者: djdam 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
train.py 文件源码 项目:faster-rcnn-scenarios 作者: djdam 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def gpu_conf(cfg, gpu_id=None):

            if gpu_id==None:
                DEVICE_ID_LIST = GPUtil.getFirstAvailable()
                if (len(DEVICE_ID_LIST) > 0):
                    cfg.GPU_ID = DEVICE_ID_LIST[0]  # grab first element from list
            else:
                cfg.GPU_ID=gpu_id

            return cfg
train_stage1_fast_rcnn.py 文件源码 项目:faster-rcnn-scenarios 作者: djdam 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
train_stage2_rpn.py 文件源码 项目:faster-rcnn-scenarios 作者: djdam 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
generate_proposals.py 文件源码 项目:faster-rcnn-scenarios 作者: djdam 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
server_Dec_26.py 文件源码 项目:CTT 作者: ZhouYzzz 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def build_net():
    prototxt = os.path.join(cfg.ROOT_DIR, 'models', 
            NETS[args.demo_net][0], 'faster_rcnn_alt_opt', 
            'faster_rcnn_test.pt')
    caffemodel = os.path.join(cfg.ROOT_DIR, 'data', 
            'faster_rcnn_models', NETS[args.demo_net][1])
    caffe.set_mode_gpu()
    caffe.set_device(args.gpu_id)
    cfg.GPU_ID = args.gpu_id
    net = caffe.Net(prototxt, caffemodel, caffe.TEST)
    return net
server.py 文件源码 项目:CTT 作者: ZhouYzzz 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def build_net():
    prototxt = os.path.join(cfg.ROOT_DIR, 'models', 
            NETS[args.demo_net][0], 'faster_rcnn_alt_opt', 
            'faster_rcnn_test.pt')
    caffemodel = os.path.join(cfg.ROOT_DIR, 'data', 
            'faster_rcnn_models', NETS[args.demo_net][1])
    caffe.set_mode_gpu()
    caffe.set_device(args.gpu_id)
    cfg.GPU_ID = args.gpu_id
    net = caffe.Net(prototxt, caffemodel, caffe.TEST)
    return net
nms_wrapper.py 文件源码 项目:PVANet-FACE 作者: twmht 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
train_faster_rcnn_alt_opt.py 文件源码 项目:PVANet-FACE 作者: twmht 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
nms_wrapper.py 文件源码 项目:craftGBD 作者: craftGBD 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
nms_wrapper.py 文件源码 项目:py-R-FCN 作者: YuwenXiong 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
train_faster_rcnn_alt_opt.py 文件源码 项目:py-R-FCN 作者: YuwenXiong 项目源码 文件源码 阅读 41 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
train_rfcn_alt_opt_5stage.py 文件源码 项目:py-R-FCN 作者: YuwenXiong 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def _init_caffe(cfg):
    """Initialize pycaffe in a training process.
    """

    import caffe
    # fix the random seeds (numpy and caffe) for reproducibility
    np.random.seed(cfg.RNG_SEED)
    caffe.set_random_seed(cfg.RNG_SEED)
    # set up caffe
    caffe.set_mode_gpu()
    caffe.set_device(cfg.GPU_ID)
nms_wrapper.py 文件源码 项目:SubCNN 作者: tanshen 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def nms(dets, thresh):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
nms_wrapper.py 文件源码 项目:person_search 作者: ShuangLI59 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)


问题


面经


文章

微信
公众号

扫码关注公众号