Serializers

Serialization in NumPy NPZ format

NumPy serializers can be used in arbitrary environments that Chainer runs with. It consists of asymmetric serializer/deserializer due to the fact that numpy.savez() does not support online serialization. Therefore, serialization requires two-step manipulation: first packing the objects into a flat dictionary, and then serializing it into npz format.

chainer.serializers.DictionarySerializer

Serializer for dictionary.

chainer.serializers.NpzDeserializer

Deserializer for NPZ format.

chainer.serializers.save_npz

Saves an object to the file in NPZ format.

chainer.serializers.load_npz

Loads an object from the file in NPZ format.

Serialization in HDF5 format

chainer.serializers.HDF5Serializer

Serializer for HDF5 format.

chainer.serializers.HDF5Deserializer

Deserializer for HDF5 format.

chainer.serializers.save_hdf5

Saves an object to the file in HDF5 format.

chainer.serializers.load_hdf5

Loads an object from the file in HDF5 format.

Serializers base classes

chainer.Serializer

Base class of all serializers.

chainer.AbstractSerializer

Abstract base class of all serializers and deserializers.

chainer.Deserializer

Base class of all deserializers.