code: def save_parameters(self, path, grad_only=False):
          
          params = self.get_parameters(grad_only=grad_only)
          nn.save_parameters(path, params)
docs: Save all parameters into a file with the specified format.
  
          Currently hdf5 and protobuf formats are supported.
  
          Args:
              path : path or file object
              grad_only (bool, optional): Return parameters with `need_grad` option as `True`.