You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.dataset.deserialize.rst 1.1 kB

4 years ago
12345678910111213141516171819202122
  1. mindspore.dataset.deserialize
  2. ==============================
  3. .. py:method:: mindspore.dataset.deserialize(input_dict=None, json_filepath=None)
  4. 数据处理管道反序列化,支持输入Python字典或使用 `mindspore.dataset.serialize()` 接口生成的JSON文件。
  5. .. note::
  6. 反序列化包含自定义Python函数的数据处理管道时,部分参数信息可能丢失;当 `input_dict` 和 `json_filepath` 同时不为None时,返回反序列化JSON文件的结果。
  7. **参数:**
  8. - **input_dict** (dict) - 以Python字典存储的数据处理管道。默认值:None。
  9. - **json_filepath** (str) - 数据处理管道JSON文件的路径,该文件以通用JSON格式存储了数据处理管道信息,用户可通过 `mindspore.dataset.serialize()` 接口生成。默认值:None。
  10. **返回:**
  11. 当反序列化成功时,将返回Dataset对象;当无法被反序列化时,deserialize将会失败,且返回None。
  12. **异常:**
  13. - **OSError** - `json_filepath` 不为None且JSON文件解析失败时。