Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yeates opened this issue May 8, 2018 · 1 comment
Open

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

yeates opened this issue May 8, 2018 · 1 comment

Comments

@yeates
Copy link

yeates commented May 8, 2018

No description provided.

@yeates yeates changed the title How to convert ourselves caption to t7 format? How to convert ourselves caption data to t7 format? May 8, 2018
@jingliao132
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants