当前位置:网站首页>画结果图推荐网址
画结果图推荐网址
2022-04-23 11:53:00 【冬炫】
参考链接:
from torchvision.datasets import CIFAR100
cifar100 = CIFAR100(os.path.expanduser("~/.cache"), transform=preprocess, download=True)
text_descriptions = [f"This is a photo of a {label}" for label in cifar100.classes]
text_tokens = clip.tokenize(text_descriptions).cuda()
with torch.no_grad():
text_features = model.encode_text(text_tokens).float()
text_features /= text_features.norm(dim=-1, keepdim=True)
text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)
top_probs, top_labels = text_probs.cpu().topk(5, dim=-1)
版权声明
本文为[冬炫]所创,转载请带上原文链接,感谢
https://blog.csdn.net/u012211422/article/details/124336859
边栏推荐
- Exploring the equipment and teaching of robot education
- 第五章 使用In-Memory表达式优化查询(IM 5.1)
- Interpretation 3 of gdpr series: how do European subsidiaries return data to domestic parent companies?
- Step function of activation function
- 数据库如何填充IM表达式(IM 5.4)
- Purpose of IM expression (IM 5.2)
- 解析幼儿教育中steam教育的融合
- The listing of saiweidian Technology Innovation Board broke: a decrease of 26% and the market value of the company was 4.4 billion
- Analyzing the role of social robots in basic science
- Siri gave the most embarrassing social death moment of the year
猜你喜欢
2022 love analysis · panoramic report of industrial Internet manufacturers
qt5. 8. You want to use SQLite in the 64 bit static library, but the static library has no method to compile the supporting library
论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》
IFLYTEK's revenue in 2021 was 18.3 billion yuan: a year-on-year increase of 41% and a net profit of 1.556 billion yuan
Nacos Basics (5): getting started with Nacos configuration
Analyzing the role of social robots in basic science
让中小学生在快乐中学习的创客教育
解读2022机器人教育产业分析报告
解析性能良好的机器人使用守则
Force buckle - 1137 Nth teponacci number
随机推荐
laravel 永远返回 JSON 响应
IDEA 代码质量规范插件SonarLint
thinkphp 添加图片文字水印生成带二维码的推广海报
Laravel绑定钉钉群警报(php)
Yunna | how to manage the company's fixed assets and how to manage fixed assets
《通用数据保护条例》(GDPR)系列解读三:欧洲子公司如何向国内母公司回传数据?
qt5. 8. You want to use SQLite in the 64 bit static library, but the static library has no method to compile the supporting library
Nacos Foundation (8): login management
1. Construction of electron development environment
Study notes of C [8] SQL [1]
少儿编程结构的改变之路
Share two practical shell scripts
ImportError: libX11.so.6: cannot open shared object file: No such file or directory
Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week
2022 love analysis · panoramic report of industrial Internet manufacturers
Siri gave the most embarrassing social death moment of the year
MySQL 的主从复制配置
Golang's pen test questions & interview questions 01
IDEA 数据库插件Database Navigator 插件
IM 体系结构:CPU架构:SIMD向量处理(IM-2.3)