FYI
I read the code and I believe that it can't save many batches. The reason is that it tries to use the same name for the dataset.
I made a simple modification and it can save many datasets in the same hdf5. If you are interested on that, I put my
code online.
As far as I understood, you can use my code to dump layers(blobs) on hdf5 files calling caffe binary.
I/you have to test that you will get the data in the same order. The reason is that I don't get the iteration number from Net. Instead, I use a new attribute on the hdf5_output_layer. It is possible that they are not synchronized.
Regards,