当前位置:网站首页>Pytoch through datasets Imagefolder loads datasets directly from files
Pytoch through datasets Imagefolder loads datasets directly from files
2022-07-05 12:26:00 【Dongcheng West que】
tf = transforms.Compose([
transforms.Resize((64,64)),
transforms.ToTensor(),
])
db=torchvision.datasets.ImageFolder(root="pokemon",transform=tf)
loader=DataLoader(db,batch_size=32,shuffle=True)
print("make-code",db.class_to_idx)
for x, y in loader:
viz.images(x, nrow=8, win="batch", opts=dict(title="batch"))
viz.text(str(y.numpy()), win="lablel", opts=dict(title="batch-y"))
time.sleep(10)
边栏推荐
- Acid transaction theory
- [HDU 2096] 小明A+B
- SENT协议译码的深入探讨
- Error modulenotfounderror: no module named 'cv2 aruco‘
- Experimental design - using stack to realize calculator
- Complete activity switching according to sliding
- MySQL multi table operation
- MySQL data table operation DDL & data type
- 自动化测试生命周期
- The evolution of mobile cross platform technology
猜你喜欢

强化学习-学习笔记3 | 策略学习

Why learn harmonyos and how to get started quickly?

Master-slave mode of redis cluster

mysql拆分字符串做条件查询

Master the new features of fluent 2.10

Simple production of wechat applet cloud development authorization login

Redis highly available slice cluster

16 channel water lamp experiment based on Proteus (assembly language)

Mmclassification training custom data

C language structure is initialized as a function parameter
随机推荐
[untitled]
Knowledge representation (KR)
Automated test lifecycle
MySQL regular expression
JS for循环 循环次数异常
How to clear floating?
一款新型的智能家居WiFi选择方案——SimpleWiFi在无线智能家居中的应用
Learn the garbage collector of JVM -- a brief introduction to Shenandoah collector
Matlab imoverlay function (burn binary mask into two-dimensional image)
ZABBIX customized monitoring disk IO performance
Swift - enables textview to be highly adaptive
Reinforcement learning - learning notes 3 | strategic learning
NPM install reports an error
II. Data type
Migrate data from Mysql to neo4j database
Learn JVM garbage collection 05 - root node enumeration, security points, and security zones (hotspot)
How can beginners learn flutter efficiently?
POJ-2499 Binary Tree
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
Redis highly available sentinel cluster