Spaces:
Build error
Build error
File size: 328 Bytes
d7b89b7 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import glob
import h5py
for fpath in glob.glob('modelnet_c/*.h5'):
f = h5py.File(fpath)
data = f['data'][:].astype('float32')
label = f['label'][:].astype('int64')
f.close()
f = h5py.File(fpath, 'w')
f.create_dataset('data', data=data[:100])
f.create_dataset('label', data=label[:100])
f.close() |