
pytoch学习
Regect
毕业于斯坦福大学,精通数据库,python,人工智能。每年发表5篇sci。假期在谷歌实习,带来团队参与无人机定位计算。爱好是喝啤酒,酒量还不行,喝了之后就爱吹牛逼。
展开
-
给网络测试推理时间
from datetime import datetimeprec_time = datetime.now()cur_time = datetime.now()h, remainder = divmod((cur_time - prec_time).seconds, 3600)m, s = divmod(remainder, 60)time_str = 'Time: {:.0f}:{:.0f}:{:.0f}'.format(h, m, s)原创 2021-08-30 17:22:57 · 411 阅读 · 0 评论 -
sudo: ./scripts/aanet_inference.sh: command not found
如果出现以下这种情况,可以更改对应.sh文件的权限chmod 777 xxxx.shroot@1f73a7620ca7:/home/aiya/work/aanet-master# ./scripts/aanet_inference.shbash: ./scripts/aanet_inference.sh: Permission deniedroot@1f73a7620ca7:/home/aiya/work/aanet-master# sudo ./scripts/aanet_inference.sh原创 2021-08-19 09:55:37 · 187 阅读 · 0 评论 -
aanet立体匹配安装中的坑
GPU:3060第一次尝试基础环境:python3.7.11 cuda10.0 pytorch1.2在运行脚本./scripts/aanet_predict.sh会出现以下问题:1 卡死半天。2 半天之后出现以下文字:RuntimeError: CUDA error: no kernel image is available for execution on the device第二次尝试基础环境:python3.7.11 cuda10.0 pytorch1.4在运行脚本./s原创 2021-08-16 19:23:38 · 763 阅读 · 1 评论 -
海康威视工业相机驱动下载地址
https://www.hikrobotics.com/machinevision/service/download?module=0原创 2021-05-13 11:47:06 · 6058 阅读 · 0 评论 -
pytorch官方网络模型库有哪些网络
‘alexnet’,‘deeplabv3_resnet101’,‘deeplabv3_resnet50’,‘densenet121’,‘densenet161’,‘densenet169’,‘densenet201’,‘fcn_resnet101’,‘fcn_resnet50’,‘googlenet’,‘inception_v3’,‘mnasnet0_5’,‘mnasnet0_75’,‘mnasnet1_0’,‘mnasnet1_3’,‘mobilenet_v2’,‘mobi原创 2021-01-21 21:25:54 · 1922 阅读 · 0 评论 -
python缩放图片大小
缩放图片大小#提取目录下所有图片,更改尺寸后保存到另一目录from PIL import Imageimport os.pathimport globdef convertjpg(jpgfile,outdir,width=518,height=388):img=Image.open(jpgfile)try:new_img=img.resize((width,height),Image.BILINEAR)new_img.save(os.path.join(outdir,os.path.bas原创 2021-01-11 10:12:15 · 823 阅读 · 0 评论 -
torch.device
print(torch.cuda.is_available())if torch.cuda.is_available():device = torch.device(‘cuda’)y = torch.ones_like(x,device=device)x = x.to(device)原创 2020-12-15 23:08:09 · 237 阅读 · 1 评论 -
2020-12-15
NumPy ndarray 转成Torch Tensorimport numpy as npimport torcha = np.ones(5)b =torch.from_numpy(a)np.add(a,1,out = a)print(a)原创 2020-12-15 22:42:35 · 142 阅读 · 0 评论