NpzDeserializer(npz, path='', strict=True, ignore_names=)¶
Deserializer for NPZ format.
This is the standard deserializer in Chainer. This deserializer can be used to read an object serialized by
- npz – npz file object.
- path – The base path that the deserialization starts from.
- strict (bool) – If
True, the deserializer raises an error when an expected value is not found in the given NPZ file. Otherwise, it ignores the value and skip deserialization.
- ignore_names (string, callable or list of them) – If callable, it is a function that takes a name of a parameter
and a persistent and returns
Truewhen it needs to be skipped. If string, this is a name of a parameter or persistent that are going to be skipped. This can also be a list of callables and strings that behave as described above.
Loads an object from this deserializer.
This is equivalent to
Parameters: obj – Target object to be serialized.