当前位置:网站首页>【踩坑合辑】7.14
【踩坑合辑】7.14
2022-07-16 11:57:00 【反科研pua所所长】
Certifacte verify failed: certificate has expired (_ssl.c:1108)
看字面意思好像是python证书的问题,但其实是在下载某个模型时遇到的,查了网上一些去下载证书的方法,无果(网站打不开)于是选择自行下载好这个模型,再传到服务器上,完美解决~
linux查看cuda版本
失败:
cat /usr/local/cuda/version.txt
懒得找为什么
成功:
nvcc --version
但是忘记在哪里看到的了,好像这两种方案中,有一种是错误的,其显示的不是当前cuda版本,而是当前能容纳的最高cuda版本
range类型转list
b = list(range(10))
python中实现for循环的并行
为了实现这一点,今天真实搞吐我了…检索了好多办法,都感觉不适合我的任务,看到最多的是multiprocessing方法,但这种方法,感觉传递的参数有限,好几个例子中都只能传递一个参数…
于是我又找了一些,发现sklearn封装好的Parallel更容易学一点,参考文章python循环并行,sklearn大神们早已经为你封装好了一个函数于是就写成了:
def evaluate_model(t, movie_clip_featmaps, model, sent_vec):
featmap = movie_clip_featmaps[t][1]
visual_clip_name = movie_clip_featmaps[t][0]
start = float(visual_clip_name.split("_")[1])
end = float(visual_clip_name.split("_")[2].split("_")[0])
featmap = np.reshape(featmap, [1, featmap.shape[0]])
outputs = model(torch.from_numpy(featmap).cuda(device), torch.from_numpy(sent_vec).cuda(device))
outputs = torch.reshape(outputs, [3])
reg_end = end + outputs[2]
reg_start = start + outputs[1]
return outputs[0], reg_start, reg_end
parallel =Parallel(n_jobs=8)
all_results = parallel(delayed(evaluate_model)(t, movie_clip_featmaps, model, sent_vec) for t in range(len(movie_clip_featmaps)))
zipped_results = list(zip(*all_results))
sim, reg_start, reg_end = zipped_results
sentence_image_mat[k, :] = np.array(sim)
# sentence_image_reg_mat[k, :, 0] = np.array(reg_start)
# sentence_image_reg_mat[k, :, 1] = np.array(reg_end)
有机会再做解释
sklearn.externals.joblib导入问题
边栏推荐
- SWD/JTAG Communication Failure和No Target Connected
- 一款优秀的信息搜集图形化工具Maltego
- 美国压力激增 TikTok更换全球安全主管
- Shengxin weekly issue 36
- 电脑PC与S7-200SMART PLC不在同一网段,如何建立通信连接?
- 安全的终止2nodeos的运行
- 元宇宙、NFT数字藏品是什么?
- 为何加上@Configuration注解的类会生成cglib代理?
- 关于cJSON的valueint超过整型范围的问题
- npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
猜你喜欢

从物理转 AI 、战数据库,95后程序员的职业选择
![[Huawei online battle] download and run Huawei's official unity example code, prompting authentication failure and returning error code 100114](/img/62/9918f8b916baf987f6a3f92da4eecc.png)
[Huawei online battle] download and run Huawei's official unity example code, prompting authentication failure and returning error code 100114

二 配置目标make menuconfig的执行过程分析

Chinese translation of zagayevsky's "try to praise this incomplete world"

【实战】1382- 一文拥有属于你的 puppeteer 爬虫应用

thymeleaf介绍与简单应用

From physics to AI and war database, the career choice of post-95 programmers

Etcd database source code analysis -- etcdserver bootstrap initialization cluster and raft

电脑PC与S7-200SMART PLC不在同一网段,如何建立通信连接?

如何统计游戏中的数据
随机推荐
mixin\插件\scoped样式
因果学习将开启下一代AI浪潮?九章云极DataCanvas正式发布YLearn因果学习开源项目
PostgreSQL source code (10) xlog assembly
2022年全球职业教育行业发展报告
Flutter realizes the gradual enlargement of hero pictures and the equal proportion method of pictures. Pictures are smoothly enlarged
STC8H開發(十四): I2C驅動RX8025T高精度實時時鐘芯片
离婚后,子女大额抚养费双方如何负担
HCIA-R&S自用笔记(7)(网络层)TTL及环路测试,协议号
ETCD数据库源码分析——etcdserver bootstrap初始化cluster和raft
js base64转图片
flutter实现hero图片渐变放大 圖片等比方法圖片平滑放大
[AGC] growth service 3-app linking example
[HMS core] [wallet kit] [solution] why can't Huawei wallet's client sample code run
Ceph分布式存储性能调优(六)
Gerrit基本的权限管理
ipfs记录
Shengxin weekly issue 36
1.4 process control statement
1.5.1 infinite cycle
[harmonyos] [arkui] Hongmeng ETS method tabs+tabcontent realizes the bottom navigation bar