class_docstr: Extends the HDF5Iterator class to add one hot conversion of the
  target data. For example::
  
      train_set = HDF5IteratorOneHot('your_data_path.h5')
  
  The HDF5 file format must contain the following datasets:
  - `input` dataset: Input data, which is a 2-D array (float or uint8) that
                      has size `(N, C*H*W)`, where `N` is the number of examples,
                      `C` is the number of channels, and `H` and `W` are the height
                      and width of the image, respectively. This dataset must also
                      have the following attributes:
      - `lshape`: a tuple of int indicating the shape of each
                  input (for examples, image data may have
                  an lshape of `[C, H, W]`)
      - `mean`: the mean to subtract, either formatted as (C*H*W, 1) or
                a mean for each channel with dimensions (C, 1)
  - `output` dataset: An optional dataset which, if supplied, will be
                      used at the target/expected output of the network. the
                      array should have the shape `(N, M)` where `N` is the number
                      of items (must match the `N` dim of the input set)
                      and `M` is the size of the output data which must match
                      size of ouput from the output layer of the network.
  
  The "output" dataset in the HDF5 (if present) must have the 'nclass'
  attribute specifying the number of total output classes which is needed
  for generating the one-hot encoding.
docstr: Args:
      hdf_filename (string): Path to the HDF5 datafile.
      name (string, optional): Name to assign this iterator. Defaults to None.
docstr_tok: ["Args",":","hdf_filename","(","string",")",":","Path","to","the","HDF5","datafile",".","name","(","string",",","optional",")",":","Name","to","assign","this","iterator",".","Defaults","to","None","."]
code: def __init__(self, hdf_filename, name=None):
      """
      Args:
          hdf_filename (string): Path to the HDF5 datafile.
          name (string, optional): Name to assign this iterator. Defaults to None.
      """
      super(HDF5IteratorOneHot, self).__init__(hdf_filename, name=name)
      if "output" in self.hdf_file:
          assert (
              "nclass" in self.hdf_file["output"].attrs
          ), "Missing nclass attribute"
          self.nclass = int(self.hdf_file["output"].attrs["nclass"])
          self.out = np.array(
              self.hdf_file["output"], dtype=np.int32
          ).reshape((-1, 1))
  
imports: import os
  import h5py
  import logging
  import numpy
  from neon.data import ArrayIterator
label_desc: Use image node_id 1 to create a new HDF5IteratorOneHot object from inherited base classes: HDF5Iterator with example: obj = HDF5IteratorOneHot(hdf_filename, name)