Spaces:
Build error
Build error
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() |