mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-02-13 15:16:03 +08:00
检视问题一览2修改 (#235)
This commit is contained in:
@@ -40,7 +40,8 @@ Binding)。在Pybind11出现以前,将C和C++函数进行Python绑定的手
|
||||
- 算子属性:构造函数\_\_init\_\_中初始化属性,因加法没有属性,因此\_\_init\_\_不需要额外输入。
|
||||
|
||||
- 算子输入输出及合法性校验:infer_shape方法中约束两个输入维度必须相同,输出的维度和输入维度相同。infer_dtype方法中约束两个输入数据必须是float32类型,输出的数据类型和输入数据类型相同。
|
||||
算子输出
|
||||
|
||||
- 算子输出
|
||||
|
||||
MindSpore中实现注册TensorAdd代码如下:
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user