mindspore_gl.translate ====================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/graphlearning/blob/master/docs/api_python/mindspore_gl/mindspore_gl.translate.rst :alt: 查看源文件 .. py:function:: mindspore_gl.translate(obj, method_name: str, translate_path: None or str = None) 将顶点中心代码转换为MindSpore可理解代码。 翻译后,将在 `/.mindspore_gl` 中生成一个新函数。原方法将被此函数替换。 参数: - **obj** (Object) - 翻译对象。 - **method_name** (str) - 要转换的方法的名称。 - **translate_path** (str) - 构造文件的保存路径。