Deleting a branch is permanent. It CANNOT be undone. Continue?
tanh01
into master
1 year ago
Deleting a branch is permanent. It CANNOT be undone. Continue?
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》
图模式下报什么错误?
RuntimeError: For operation 'getitem', current input arguments types are <Number, Number>. The 1-th argument type 'Number' is not supported now.
嗯嗯, 了解了, 谢谢。
这个地方我刚才试了一下, ms.ops.pad(input_x, _pad, value=neg_inf), neg_inf的dtype要与input_x相同, 所以如果input_x是int的话, 可能会报错。
maxpool本身不支持int,理论上讲这种情形不需要支持,但是报错信息会由pad发出,对这一点进行修改,检测到int输入会在最开始报错
ops.pad 虽然在ascend上已经支持了, 但由于还未正式发布, 所以有些场景结果可能不太对。
比如以下用例:
import mindspore as ms
import numpy as np
a = ms.Tensor(1, 2, 3.], [4, 5, 6, dtype=ms.float32)
_pad = (1, 1, 0, 0)
a = ms.ops.pad(a , _pad, mode='constant', value=3)
print(a)
CPU结果:[[3. 1. 2. 3. 3.]
[3. 4. 5. 6. 3.]]
Ascend结果:
[[0. 0. 0. 1. 2.]
[3. 4. 5. 6. 0.]]
建议先不要在Ascend上使用ms.ops.pad
a = ms.Tensor(1, 2, 3.], [4, 5, 6, dtype=ms.float32)
fix maxpool1d, maxpool2dto fix maxpool1d, maxpool2d, torch.histc 1 year agod3528d05ca
.