sponge.function.get_length =============================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/docs/api/api_python/function/sponge.function.get_length.rst :alt: 查看源文件 .. py:function:: sponge.function.get_length(length: Union[Length, float], unit: Union[str, Units] = None) 获取特定单位的长度张量。 参数: - **length** (Union[Length, float]) - 长度值。 - **unit** (Union[str, Units],可选) - 长度单位。默认值: ``None``。 返回: 特定单位的长度张量。