当前位置:网站首页>画结果图推荐网址
画结果图推荐网址
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
边栏推荐
- 第四章 为IM 启用填充对象之在NO INMEMORY表上指定INMEMORY列属性:示例(IM-4.4 第四部分)
- Sigmoid function of activation function
- Laravel增加自定义助手函数
- 论坛系统数据库设计
- NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol
- 解读2022机器人教育产业分析报告
- MySQL 的主从复制配置
- Yunna | how to manage the company's fixed assets and how to manage fixed assets
- 激活函数之sigmoid函数
- Nacos Basics (5): getting started with Nacos configuration
猜你喜欢
激活函数之阶跃函数
Docker MySQL master-slave backup
IDEA 数据库插件Database Navigator 插件
Force buckle - 1137 Nth teponacci number
NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol
抓包整理————tcp 协议[八]
The way to change children's programming structure
Yunna | how to manage the company's fixed assets and how to manage fixed assets
Interpretation of biological recognition in robot programming course
Resolution due to AMD not found_ ags_ x64. DLL, unable to continue code execution. Reinstallation of the program may solve this problem, Forza horizon 5
随机推荐
ThinkPHP adds image text watermark to generate promotion poster with QR code
Chapter 5 optimizing queries using in memory expressions (IM 5.1)
零钱兑换II——【LeetCode】
Redis optimization series (II) redis master-slave principle and master-slave common configuration
thinkphp 添加图片文字水印生成带二维码的推广海报
TclError: no display name and no $DISPLAY environment variable
少儿编程结构的改变之路
IDEA 代码质量规范插件SonarLint
IDEA 代码格式化插件Save Actions
第四章 为IM 启用填充对象之为IM列存储启用ADO(IM 4.8)
Windows11 安装MySQL服务 提示:Install/Remove of the Service Denied
力扣-1137.第N个泰波那契数
Yunna | fixed assets inventory supports multiple inventory methods (asset inventory)
Significance of actively participating in middle school robot competition
远程访问家里的树莓派(上)
AcWing 1874. Moo encryption (enumeration, hash)
Use kettle to copy records to and get records from results
tensorflow常用的函数
Database design of simple voting system
NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol