当前位置:网站首页>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)
边栏推荐
- Understand redis persistence mechanism in one article
- Hexadecimal conversion summary
- ZABBIX customized monitoring disk IO performance
- JS for loop number exception
- mysql拆分字符串做条件查询
- MySQL transaction
- MySQL stored procedure
- Seven polymorphisms
- ACID事务理论
- 【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
猜你喜欢

Four operations and derivative operations of MATLAB polynomials

Redis highly available sentinel cluster

Learn memory management of JVM 01 - first memory
![[untitled]](/img/56/6a9a4bcab6503872942fff7a365def.jpg)
[untitled]

Take you hand in hand to develop a service monitoring component

Anaconda creates a virtual environment and installs pytorch

mmclassification 训练自定义数据

Redis clean cache
![[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]](/img/ad/b96e9319212cf2724e0a640109665d.png)
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]

Learn the memory management of JVM 02 - memory allocation of JVM
随机推荐
PIP command reports an error pip is configured with locations that requires tls/ssl problems
SENT协议译码的深入探讨
byte2String、string2Byte
GPS數據格式轉換[通俗易懂]
Migrate data from Mysql to neo4j database
[untitled]
How to clear floating?
July Huaqing learning-1
Which domestic cloud management platform manufacturer is good in 2022? Why?
Redis's memory elimination mechanism, read this article is enough.
[superhard core] is the core technology of redis
Introduction to GNN
Uniapp + unicloud + Unipay realize wechat applet payment function
Linux Installation and deployment lamp (apache+mysql+php)
Swift - enables textview to be highly adaptive
Interviewer: is acid fully guaranteed for redis transactions?
Matlab boundarymask function (find the boundary of the divided area)
Instance + source code = see through 128 traps
自动化测试生命周期
想问问,如何选择券商?在线开户是很安全么?