chainer.serializers.save_hdf5

chainer.serializers.save_hdf5(filename, obj, compression=4)

Saves an object to the file in HDF5 format.

This is a short-cut function to save only one object into an HDF5 file. If you want to save multiple objects to one HDF5 file, use HDF5Serializer directly by passing appropriate h5py.Group objects.

Parameters:
  • filename (str) – Target file name.
  • obj – Object to be serialized. It must support serialization protocol.
  • compression (int) – Gzip compression level.