![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Lonely Dancer
这个作者很懒,什么都没留下…
展开
-
Python关闭警告(warning) (通用 pytorch…)
最近用pytorch跑代码,中间各种warning,有的还要改库的源码才能关掉warning,非常麻烦,调了很久也没搞定;可是不关warning的话,乱七八糟的输出又很烦人,所以我专门搜索,终于找到了解决办法。import warningswarnings.filterwarnings("ignore")两行代码,完事儿(最好加在最前面)...原创 2022-05-28 19:47:50 · 5822 阅读 · 0 评论 -
Metashape导出深度图
“Metashape在生成模型的时候会在工程目录下生成“depth_maps”文件夹,里面有“data0.zip”、“data1.zip”、…,但是我们自己并不熟悉其中数据组成的情况,难以直接使用,需要Python脚本来实现。详情参考:Exporting depth maps脚本来源于Exporting depth maps这里也粘贴出其源码,脚本命名为“export_depth_maps_dialog.py”# Exports depth map of each camera.##..原创 2022-02-24 11:09:56 · 2172 阅读 · 1 评论 -
pytorch学习中 torch.squeeze() 和 torch.unsqueeze()的简单使用
>>> import torch>>> a=torch.randn(1,3)>>> print(a)tensor([[-0.0837, -0.0136, -0.1506]])>>> print(a.shape)torch.Size([1, 3])>>> b=torch.unsqueeze(a,2)>>> print(b)tensor([[[-0.0837], [-0.原创 2021-03-31 08:03:05 · 243 阅读 · 0 评论