当前位置: 首页 > news >正文

自助微信网站设计广东十大排名建筑公司

自助微信网站设计,广东十大排名建筑公司,毕业设计指导网站建设,官方网站是 优帮云十#xff1a;Paddle Inference推理 #xff08;python#xff09;API详解 9. 启用内存优化 API定义如下#xff1a; # 开启内存 / 显存复用#xff0c;具体降低内存效果取决于模型结构 # 参数#xff1a;None # 返回#xff1a;None paddle.inference.Config.enable…十Paddle Inference推理 pythonAPI详解 9. 启用内存优化 API定义如下 # 开启内存 / 显存复用具体降低内存效果取决于模型结构 # 参数None # 返回None paddle.inference.Config.enable_memory_optim() 代码示例 # 引用 paddle inference 预测库 import paddle.inference as paddle_infer# 创建 config config paddle_infer.Config(./mobilenet_v1.pdmodel, ./mobilenet_v1.pdiparams)# 开启 CPU 显存优化 config.enable_memory_optim()# 启用 GPU 进行预测 config.enable_use_gpu(100, 0)# 开启 GPU 显存优化 config.enable_memory_optim() 10. 设置缓存路径 注意 如果当前使用的为 TensorRT INT8 且设置从内存中加载模型则必须通过 set_optim_cache_dir 来设置缓存路径。 API定义如下 # 设置缓存路径 # 参数opt_cache_dir - 缓存路径 # 返回None paddle.inference.Config.set_optim_cache_dir(opt_cache_dir: str) 代码示例 # 引用 paddle inference 预测库 import paddle.inference as paddle_infer# 创建 config config paddle_infer.Config(./mobilenet_v1.pdmodel, ./mobilenet_v1.pdiparams)# 设置缓存路径 config.set_optim_cache_dir(./OptimCacheDir) 11. Profile 设置 API定义如下 # 打开 Profile运行结束后会打印所有 OP 的耗时占比 # 参数None # 返回None paddle.inference.Config.enable_profile() 代码示例 # 引用 paddle inference 预测库 import paddle.inference as paddle_infer# 创建 config config paddle_infer.Config(./mobilenet_v1.pdmodel, ./mobilenet_v1.pdiparams)# 打开 Profile config.enable_profile() 执行预测之后输出的 Profile 的结果如下 ------------------------- Profiling Report -------------------------Place: CPU Time unit: ms Sorted by total time in descending order in the same thread------------------------- Overhead Summary -------------------------Total time: 1085.33Computation time Total: 1066.24 Ratio: 98.2411%Framework overhead Total: 19.0902 Ratio: 1.75893%------------------------- GpuMemCpy Summary -------------------------GpuMemcpy Calls: 0 Total: 0 Ratio: 0%------------------------- Event Summary -------------------------Event Calls Total Min. Max. Ave. Ratio. thread0::conv2d 210 319.734 0.815591 6.51648 1.52254 0.294595 thread0::load 137 284.596 0.114216 258.715 2.07735 0.26222 thread0::depthwise_conv2d 195 266.241 0.955945 2.47858 1.36534 0.245308 thread0::elementwise_add 210 122.969 0.133106 2.15806 0.585568 0.113301 thread0::relu 405 56.1807 0.021081 0.585079 0.138718 0.0517635 thread0::batch_norm 195 25.8073 0.044304 0.33896 0.132345 0.0237783 thread0::fc 15 7.13856 0.451674 0.714895 0.475904 0.0065773 thread0::pool2d 15 1.48296 0.09054 0.145702 0.0988637 0.00136636 thread0::softmax 15 0.941837 0.032175 0.460156 0.0627891 0.000867786 thread0::scale 15 0.240771 0.013394 0.030727 0.0160514 0.000221841 12. Log 设置 API定义如下 # 去除 Paddle Inference 运行中的 LOG # 参数None # 返回None paddle.inference.Config.disable_glog_info()# 判断是否禁用 LOG # 参数None # 返回bool - 是否禁用 LOG paddle.inference.Config.glog_info_disabled() 代码示例 # 引用 paddle inference 预测库 import paddle.inference as paddle_infer# 创建 config config paddle_infer.Config(./mobilenet_v1.pdmodel, ./mobilenet_v1.pdiparams)# 去除 Paddle Inference 运行中的 LOG config.disable_glog_info()# 判断是否禁用 LOG - true print(GLOG INFO is: {}.format(config.glog_info_disabled())) 13. 查看config配置 API定义如下 # 返回 config 的配置信息 # 参数None # 返回string - config 配置信息 paddle.inference.Config.summary() 调用summary()的输出如下所示 ----------------------------------------------------------------- | Option | Value | ----------------------------------------------------------------- | model_dir | ./inference_pass/TRTFlattenTest/ | ----------------------------------------------------------------- | cpu_math_thread | 1 | | enable_mkldnn | false | | mkldnn_cache_capacity | 10 | ----------------------------------------------------------------- | use_gpu | true | | gpu_device_id | 0 | | memory_pool_init_size | 100MB | | thread_local_stream | false | | use_tensorrt | true | | tensorrt_precision_mode | fp32 | | tensorrt_workspace_size | 1073741824 | | tensorrt_max_batch_size | 32 | | tensorrt_min_subgraph_size | 0 | | tensorrt_use_static_engine | false | | tensorrt_use_calib_mode | false | | tensorrt_enable_dynamic_shape | false | | tensorrt_use_oss | true | | tensorrt_use_dla | false | ----------------------------------------------------------------- | use_xpu | false | ----------------------------------------------------------------- | ir_optim | true | | ir_debug | false | | memory_optim | false | | enable_profile | false | | enable_log | true | -----------------------------------------------------------------
http://www.hkea.cn/news/14378029/

相关文章:

  • 深圳仿站定制模板建站全国分类信息网站排名
  • 博物馆网站 微信 微博 建设如何做小程序平台
  • app大全软件网站免费下载wordpress 主题 标签
  • seo怎么去优化网站微信小程序开发者社区
  • 可以做网站的软件上传歌曲东莞人才网招聘
  • 网站SEO建设摘要用模板怎么做网站
  • 网站开发人员资质网站开发技术合作协议书
  • 注册网站怎么做wordpress怎么做产品列表页
  • 重庆市网站备案材料wordpress零基础
  • 做游戏网站用什么软件2015做哪个网站能致富
  • 网站建设和优司怎么样哪些公司适合做线上推广
  • 网站开发 定制 合同范本做营销网站要多少钱
  • 江西省城乡建设培训中心网站北辰集团网站建设
  • 汕头制作手机网站哪个网站可以做化学实验
  • 莎娜琳官方网站做水免费ppt模板大全下载
  • 建设盗号网站的模块鹤壁北京网站建设
  • 单页网站对攻击的好处重庆有哪些做网站的公司
  • 网站制作过程流程wordpress建网站主页
  • 麦德龙网站建设目标设计制作小车的基本步骤是
  • 林和西网站建设wordpress更换域名还是之前链接
  • 华为商城网站设计分析外贸网站设计制作
  • 网站服务器和网站删除wordpress slider标题
  • 网站模块划分规划江苏省内网站建设
  • 火鸟门户官方网站wordpress seo tdk
  • 跟犀牛云一样做网站的网易企业邮箱设置
  • 辽宁建设工程信息网备案天津关键词优化网排名
  • 社科联网站建设北仑建设银行网站
  • 河南便宜网站建设价格低内容营销方案
  • app设计模板网站六安网站优化
  • html静态网站模板下载wordpress标题代码的更改