reedscot / icml2016

Generative Adversarial Text-to-Image Synthesis
http://arxiv.org/abs/1605.05396
MIT License
913 stars 215 forks source link

How to convert ourselves caption data to t7 format? #23

Open yeates opened 6 years ago

jingliao132 commented 6 years ago

I work the save operation under torch environment, not Pytorch.etc. I convert the caption data to .h5 files and then save them by using lua. The key statements are h5fi = hdf5.open(h5_path, "r") text_tensor = h5fi:read("char"):all() img_tensor = h5fi:read("txt"):all() obj = {char=text_tensor, img=img_path, txt=img_tensor} torch.save(target_path, obj)