docs(data/dataset): 更新 load_mmap_files 函数的文档
This commit is contained in:
@@ -19,6 +19,20 @@ def load_mmap_files(root_path: str, shared: bool=True) -> Tuple[MultiSeg, int]:
|
|||||||
corresponding binary files as memory-mapped tensors. Returns tensors grouped by key
|
corresponding binary files as memory-mapped tensors. Returns tensors grouped by key
|
||||||
and total number of elements.
|
and total number of elements.
|
||||||
|
|
||||||
|
json metadata like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"file_name": "file1.bin",
|
||||||
|
"size": 1000,
|
||||||
|
"dtype": "float32",
|
||||||
|
"key": "key1"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
root_path: Root directory path containing file_mapper.json and binary files
|
root_path: Root directory path containing file_mapper.json and binary files
|
||||||
shared: Whether to load tensors in shared mode. If True, tensors can be
|
shared: Whether to load tensors in shared mode. If True, tensors can be
|
||||||
|
|||||||
Reference in New Issue
Block a user