- 博客(6)
- 资源 (11)
- 收藏
- 关注
原创 循环拼接tensor的简单操作###踩坑
循环拼接tensor1.创建空list2.将单个tensor转换为numpy,tensor_tmp3.将tensor_tmp压入listlist.append(tensor_tmp)4.转换list为tensortorch.Tensor(list)
2022-03-01 09:21:30
1536
原创 TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to
Use Tensor.cpu() to copy the tensor to host memory first.Tensor在进行numpy计算的时候需要与numpy()的格式进行转换1.查看计算的tensor的位置信息。cpu tensor或者gpu tensor(cuda)2.如果为cuda tensor,需要进行转换numpy格式(cpu tensor原理一样)1)data.cpu().detach().numpy() #将data转换成cpu numpy格式2)result.cu
2021-04-09 12:45:42
1345
原创 RuntimeError: No CUDA GPUs are available
之前运行正常突然报错:RuntimeError: No CUDA GPUs are available// 报错信息RuntimeError: No CUDA GPUs are available解决方法// 检测一下cuda是否可用print(torch.cuda.is_available())False//重新在文件头加入下面说明import torchtorch.cuda.current_device()torch.cuda._initialized = True...
2021-03-16 09:53:57
8489
1
原创 2021-03-09踩坑 torch.cat
*将两张图像的detections tensor拟合在一起** 1. 通过循环检测后,两张图像的 tensor 存在 images_detections 中 **如: [tensor([[1,2], [2,3], [3,4]]), tensor([[1,2], [2,3], [3,4]])]** 2. 直接对 images_detections 执行自融合 torch.cat(images_detections, 0 ) 即可**如: tensor([[1,2], [2,3], [3,4], [1,
2021-03-09 21:25:14
401
2
原创 解决ubantu16.04 镜像源更换问题(vim操作)
解决ubantu16.04 镜像源更换问题(vim操作)**按照常见的解决办法更改 /etc/apt/sources.listvim命令常规操作 :su root:获取权限,vim /etc/apt/sources.list光标所在位置键入 :insert (改变操作模式{插入/替换})将网上提供的镜像源(如:清华源)粘贴。esc键入,退出前键入指令(:wq!)强制退出保存即可。正常使用指令: sudo apt-get update...
2020-11-18 22:14:04
384
2
原创 联想y7000p+ubuntu16.04安装显卡驱动后循环登录问题
联想y7000p+ubuntu16.04安装显卡驱动后循环登录问题每个人的问题不同,本人试过重装n次。最后尝试此方法有效。1.系统开机按F2 进入BIOS-> security 关闭secure boot 以及trust technology。2.进入boot ,Boot mode选UEFI 下面三个都是ENable3.保存,重启.本人认为是独显和集显的问题,至此显卡驱动正式安装。...
2020-11-17 10:26:47
367
部分高分辨率SAR船舶数据
2020-10-20
软件测试的面试经历.docx
2019-12-19
百度云的面试经验的相关分享
2019-12-19
opencv3.3.0+一键装机配合vs2013
2019-12-09
Saliency Toolbox
2018-09-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人