当前位置:网站首页>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)
边栏推荐
- Recyclerview paging slide
- Application of a class of identities (vandermond convolution and hypergeometric functions)
- Master the new features of fluent 2.10
- GPS data format conversion [easy to understand]
- A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
- ABAP table lookup program
- ZABBIX ODBC database monitoring
- Learn garbage collection 01 of JVM -- garbage collection for the first time and life and death judgment
- 信息服务器怎么恢复,服务器数据恢复怎么弄[通俗易懂]
- Implementing Yang Hui triangle with cyclic queue C language
猜你喜欢

Reinforcement learning - learning notes 3 | strategic learning

NPM install reports an error

7月华清学习-1

Learn the memory management of JVM 02 - memory allocation of JVM

ZABBIX customized monitoring disk IO performance

How to clear floating?
你做自动化测试为什么总是失败?

Redis highly available slice cluster

Redis highly available sentinel mechanism

Master the new features of fluent 2.10
随机推荐
struct MySQL
mysql拆分字符串做条件查询
语义分割实验:Unet网络/MSRC2数据集
Get data from the database when using JMeter for database assertion
JS for loop number exception
Third party payment interface design
Just a coincidence? The mysterious technology of apple ios16 is actually the same as that of Chinese enterprises five years ago!
Linux Installation and deployment lamp (apache+mysql+php)
Video networkState 属性
Basic operations of MySQL data table, addition, deletion and modification & DML
PIP command reports an error pip is configured with locations that requires tls/ssl problems
Implementing Yang Hui triangle with cyclic queue C language
Summary of C language learning problems (VS)
PXE startup configuration and principle
What is the difference between canvas and SVG?
Solve the error 1045 of Navicat creating local connection -access denied for user [email protected] (using password
16 channel water lamp experiment based on Proteus (assembly language)
Correct opening method of redis distributed lock
Get the variable address of structure member in C language
byte2String、string2Byte