mindspore2022/docs/api/api_python/dataset/mindspore.dataset.serialize...

23 lines
638 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.serialize
============================
.. py:method:: mindspore.dataset.serialize(dataset, json_filepath='')
将数据处理管道序列化成JSON文件。
.. note::
目前不支持某些Python对象序列化。对于map算子的自定义Python函数序列化 `mindspore.dataset.serialize` 仅返回其函数名称。
**参数:**
- **dataset** (Dataset): 数据处理管道对象。
- **json_filepath** (str): 生成序列化JSON文件的路径。
**返回:**
Dict包含序列化数据集图的字典。
**异常:**
**OSError** - 无法打开文件。