fusion-classify.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:toothless 作者: ratt-ru 项目源码 文件源码
def get_net(caffemodel, deploy_file, use_gpu=True):
    """
    Returns an instance of caffe.Net

    Arguments:
    caffemodel -- path to a .caffemodel file
    deploy_file -- path to a .prototxt file

    Keyword arguments:
    use_gpu -- if True, use the GPU for inference
    """
    #if use_gpu:
    #    caffe.set_mode_gpu()
    caffe.set_mode_cpu()

    # load a new model
    return caffe.Net(deploy_file, caffemodel, caffe.TEST)

# Transformer function to perform image transformation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号