code: def save_parameters_as_hdf5(model, filename="model.h5"):
      # Save the model parameters into a HDF5 archive
      chainer.serializers.save_hdf5(filename, model)
      print("model.h5 saved!\n")
  
      # Load the saved HDF5 using h5py
      print("--- The list of saved params in model.h5 ---")
      f = h5py.File("model.h5", "r")
      for param_key, param in f.items():
          msg = "{}:".format(param_key)
          if isinstance(param, h5py.Dataset):
              msg += " {}".format(param.shape)
          print(msg)
          if isinstance(param, h5py.Group):
              for child_key, child in param.items():
                  print("  {}:{}".format(child_key, child.shape))
      print("---------------------------------------------\n")
  
imports: import chainer
  import h5py
  import numpy
  import model
label_desc: Use image node_id 2 for calling a global function with example usage: save_parameters_as_hdf5(model, filename) without return types