= 0.28, 0.35
xmean,xstd @inplace
def transformi(b): b['image'] = [(TF.to_tensor(o)-xmean)/xstd for o in b['image']]
= sample_dataset_dict(load_dataset('fashion_mnist').with_transform(transformi)) _dataset
100%|██████████| 2/2 [00:00<00:00, 354.55it/s]