oneflow.load

oneflow.load(path: str, global_src_rank: Optional[int] = None)Any

Loads an object saved with oneflow.save() from a directory.

Parameters
  • path (str) – The directory containing the object

  • global_src_rank (int, optional) – The source rank for loading global tensors. When specified, only the process whose rank == global_src_rank will really read the files in path, and tensors in the loaded object will be consistent with placement = flow.placement(‘cuda’, [global_src_rank])

Returns

The loaded object