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

Error Generating HDF5 (Memory Leaked) #8

Open
herleeyandi opened this issue Apr 7, 2018 · 1 comment
Open

Error Generating HDF5 (Memory Leaked) #8

herleeyandi opened this issue Apr 7, 2018 · 1 comment

Comments

@herleeyandi
Copy link

Hello thank you very much for the work. I have a problem when trying to convert train data to hdf5 I got this message in matlab.

Requested 96x96x3x38234 (7.9GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a
long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.

Error in generate_train_srresnet (line 64)
                            label(:, :, :, count) = subim_label;

I think converting dataset to HDF5 is very long process and eat much memory. Do you know how to reduce the memory used when converting it to HDF5?, I have try to use chunksz = 8; instead of chunksz = 64; but seems like we must save all in memory then write it once so the memory will be used so much. Can we do the process like 'append' instead of 'overwrite' so we can use small amount of memory.

May I know why you are not using torch.dataloader and torch.dataset instead of using HDF5?

@twtygqyy
Copy link
Owner

twtygqyy commented Apr 7, 2018

Hi @herleeyandi regarding the memory issue, one option is to split the dataset into several parts, generate the HDF5 files, and then concatenate the files together or iterate them in HDF5 dataloader. Using a smaller chunksz size could also help.

The reason why I didn't used torch.dataloader and torch.dataset is because the resize function in python is different from Matlab. So far, only using the bicubic of Matlab could achieve the best PSNR score, because it has anti-aliasing function. Please take a look at this link.

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