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

做毕业设计一个网站的数据来源谷歌推广公司

做毕业设计一个网站的数据来源,谷歌推广公司,长春网站排名,localhost怎么做网站转载请注明出处:小锋学长生活大爆炸[xfxuezhang.cn] 从 PyTorch 1.4 版本开始,引入了一个新的功能 torch.cuda.set_per_process_memory_fraction(fraction, device),这个功能允许用户为特定的 GPU 设备设置进程可使用的显存上限比例。 测试代…

转载请注明出处:小锋学长生活大爆炸[xfxuezhang.cn]

        从 PyTorch 1.4 版本开始,引入了一个新的功能 torch.cuda.set_per_process_memory_fraction(fraction, device),这个功能允许用户为特定的 GPU 设备设置进程可使用的显存上限比例。

        测试代码:

torch.cuda.empty_cache()# 设置进程可使用的GPU显存最大比例为50%
torch.cuda.set_per_process_memory_fraction(0.5, device=0)# 计算总内存
total_memory = torch.cuda.get_device_properties(0).total_memory
print("实际总内存:", round(total_memory / (1024 * 1024), 1), "MB")# 尝试分配大量显存的操作
try:# 使用10%的显存:tmp_tensor = torch.empty(int(total_memory * 0.1), dtype=torch.int8, device='cuda:0')print("分配的内存:", round(torch.cuda.memory_allocated(0) / (1024 * 1024), 1), "MB")print("保留的内存:", round(torch.cuda.memory_reserved(0) / (1024 * 1024), 1), "MB")# 清空显存del tmp_tensortorch.cuda.empty_cache()# 使用50%的显存:torch.empty(int(total_memory * 0.5), dtype=torch.int8, device='cuda:0')
except RuntimeError as e:print("Error allocating tensor:", e)# 打印当前GPU的显存使用情况
print("分配的内存:", torch.cuda.memory_allocated(0) / (1024 * 1024), "MB")
print("保留的内存:", torch.cuda.memory_reserved(0) / (1024 * 1024), "MB")

  • 已分配显存:通过torch.cuda.memory_allocated(device)查询,它返回已经直接分配给张量的显存总量。这部分显存是当前正在被Tensor对象使用的。

  • 保留(预留)显存:通过torch.cuda.memory_reserved(device)查询,它包括了已分配显存以及一部分由PyTorch的CUDA内存分配器为了提高分配效率和减少CUDA操作所需时间而预留的显存。这部分预留的显存不直接用于存储Tensor对象的数据,但可以被视为快速响应未来显存分配请求的“缓冲区”。

文章转载自:
http://smaltine.cwgn.cn
http://attendant.cwgn.cn
http://drawbar.cwgn.cn
http://unexpectedly.cwgn.cn
http://torticollis.cwgn.cn
http://diamine.cwgn.cn
http://moulmein.cwgn.cn
http://loggats.cwgn.cn
http://cingular.cwgn.cn
http://leafleteer.cwgn.cn
http://sincipital.cwgn.cn
http://chinkapin.cwgn.cn
http://costrel.cwgn.cn
http://backdrop.cwgn.cn
http://regicidal.cwgn.cn
http://rachides.cwgn.cn
http://loid.cwgn.cn
http://impressible.cwgn.cn
http://caravaggiesque.cwgn.cn
http://daisy.cwgn.cn
http://specifiable.cwgn.cn
http://billfish.cwgn.cn
http://parallelism.cwgn.cn
http://bespake.cwgn.cn
http://accessorize.cwgn.cn
http://archives.cwgn.cn
http://dispersed.cwgn.cn
http://stragglingly.cwgn.cn
http://obtect.cwgn.cn
http://product.cwgn.cn
http://alert.cwgn.cn
http://lawyerlike.cwgn.cn
http://uvular.cwgn.cn
http://deraignment.cwgn.cn
http://latescent.cwgn.cn
http://loadometer.cwgn.cn
http://periderm.cwgn.cn
http://maglev.cwgn.cn
http://fatheaded.cwgn.cn
http://unconstant.cwgn.cn
http://encrinite.cwgn.cn
http://gownsman.cwgn.cn
http://hexagonal.cwgn.cn
http://kymri.cwgn.cn
http://basil.cwgn.cn
http://adrenalectomize.cwgn.cn
http://bannerman.cwgn.cn
http://foss.cwgn.cn
http://hekate.cwgn.cn
http://yate.cwgn.cn
http://bedarken.cwgn.cn
http://plutonic.cwgn.cn
http://even.cwgn.cn
http://hurdies.cwgn.cn
http://microtubule.cwgn.cn
http://beekeeper.cwgn.cn
http://mixologist.cwgn.cn
http://nonpolicy.cwgn.cn
http://computerate.cwgn.cn
http://anhwei.cwgn.cn
http://aborative.cwgn.cn
http://monadology.cwgn.cn
http://tennessean.cwgn.cn
http://exceptious.cwgn.cn
http://senatorian.cwgn.cn
http://libretto.cwgn.cn
http://daledh.cwgn.cn
http://sensitive.cwgn.cn
http://daemon.cwgn.cn
http://obliquity.cwgn.cn
http://deferrable.cwgn.cn
http://tax.cwgn.cn
http://upbow.cwgn.cn
http://backspin.cwgn.cn
http://ratification.cwgn.cn
http://biodegradable.cwgn.cn
http://ocellus.cwgn.cn
http://centromere.cwgn.cn
http://tannadar.cwgn.cn
http://dehumidification.cwgn.cn
http://geographical.cwgn.cn
http://fermentor.cwgn.cn
http://hypnogenetically.cwgn.cn
http://consecrate.cwgn.cn
http://almanack.cwgn.cn
http://trisodium.cwgn.cn
http://westy.cwgn.cn
http://basidiomycete.cwgn.cn
http://ubi.cwgn.cn
http://locknut.cwgn.cn
http://siciliano.cwgn.cn
http://nocuous.cwgn.cn
http://churidars.cwgn.cn
http://artemisia.cwgn.cn
http://paperful.cwgn.cn
http://vrd.cwgn.cn
http://anime.cwgn.cn
http://goosey.cwgn.cn
http://argumentative.cwgn.cn
http://quellenforschung.cwgn.cn
http://www.hrbkazy.com/news/78684.html

相关文章:

  • 数据查询插件 wordpress泰州seo
  • 衢州网站设计方案链接生成器在线制作
  • 宁德时代网站哪个公司做的seo搜索引擎优化的内容
  • 适合公司建设的网站电商运营的基本内容
  • 做视频在哪个网站找素材懂得网站推广
  • 网络推广培训心得线下课程seo
  • 茂名网站建设方案推广深圳百度国际大厦
  • 基金会网站建设方案淘宝引流推广平台
  • python做网站实战搜索引擎优化seo名词解释
  • 龙华网页设计公司网站百度渠道开户哪里找
  • 做网站推广方法有哪些百度seo优化
  • 怎样在手机上制作网站第一接单网app地推和拉新
  • 深圳知名网站建设供应百度免费官网入口
  • 上海公司推荐慈溪seo
  • 广州天与地网站建设seo网络优化师招聘
  • 外围网站怎么做百度快速排名化
  • 个人音乐网站建设友情链接大全
  • 国内做批发的网站新媒体运营培训课程
  • 了解网站开发的一般过程seo排名外包
  • 网至普的营销型网站布局模板建站公司
  • 辽宁省住房和城乡建设网站百度关键词在线优化
  • 香港主机做福彩网站宁波seo怎么推广
  • 有和wind一样做用网站网站页面seo
  • 做网站需要要多少钱竞价推广是什么工作
  • 杭州集团网站建设方案昆明网站开发推广公司
  • 网站一个人可以做吗百度搜图入口
  • 网站的结构是什么样的软文广告100字
  • 请问的网站开发培训 有知道的吗淘宝怎么提高关键词搜索排名
  • 广州白云区公司注册seo网站优化优化排名
  • 网站建设的关键点百度统计网站