Use Torch-hdf5 to save Tensor to Hdf5
<p>I'm trying to use Torch-hdf5 to save some tensors to hdf5!</p>

<p>I want to follow this document very carefully:
<a href="https://github.com/deepmind/torch-hdf5/blob/master/doc/usage.md" rel="nofollow">https://github.com/deepmind/torch-hdf5/blob/master/doc/usage.md</a></p>

<p>However, on the write to hdf5 part, its exmaple is:</p>

<pre><code>require 'hdf5'
local myFile = hdf5.open('/path/to/write.h5', 'w')
myFile:write('/path/to/data', torch.rand(5, 5))
myFile:close()
</code></pre>

<p>I understand the "/path/to/write.h5" refers to the final file, but what is "/path/to/data"? Is it just a random separate path? So I just put down "data/". Then I get this horrific looking error:</p>

<pre><code>HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
  #000: H5G.c line 287 in H5Gcreate2(): no name
    major: Invalid arguments to routine
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 0:
  #000: H5I.c line 2245 in H5Iget_name(): can't retrieve object location
    major: Object atom
    minor: Can't get value
  #001: H5Gloc.c line 253 in H5G_loc(): invalid object ID
    major: Invalid arguments to routine
    minor: Bad value
</code></pre>

<p>Does hdf5 store data and instruction file seperately? Is that why we pass in two paths?</p>