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

23 lines
1.1 KiB
ReStructuredText
Raw Permalink 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.deserialize
==============================
.. py:method:: mindspore.dataset.deserialize(input_dict=None, json_filepath=None)
数据处理管道反序列化支持输入Python字典或使用 `mindspore.dataset.serialize()` 接口生成的JSON文件。
.. note::
反序列化包含自定义Python函数的数据处理管道时部分参数信息可能丢失`input_dict``json_filepath` 同时不为None时返回反序列化JSON文件的结果。
**参数:**
- **input_dict** (dict) - 以Python字典存储的数据处理管道。默认值None。
- **json_filepath** (str) - 数据处理管道JSON文件的路径该文件以通用JSON格式存储了数据处理管道信息用户可通过 `mindspore.dataset.serialize()` 接口生成。默认值None。
**返回:**
当反序列化成功时将返回Dataset对象当无法被反序列化时deserialize将会失败且返回None。
**异常:**
- **OSError** - `json_filepath` 不为None且JSON文件解析失败时。