#178 fix nn.functional.linear and add ShortTensor

Merged
zoulq merged 1 commits from frelam/MSAdapter:master20221122-2 into master 1 year ago
frelam commented 1 year ago
frelam changed title from fix nn.functional.linear to [WIP]fix nn.functional.linear 1 year ago
frelam changed title from [WIP]fix nn.functional.linear to fix nn.functional.linear 1 year ago
frelam changed title from fix nn.functional.linear to [WIP]fix nn.functional.linear 1 year ago
frelam changed title from [WIP]fix nn.functional.linear to fix nn.functional.linear 1 year ago
frelam changed title from fix nn.functional.linear to fix nn.functional.linear and add ShortTensor 1 year ago
zoulq reviewed 1 year ago
testing/ut/pytorch/tensor/test_tensor.py
@@ -616,0 +619,4 @@
assert tensor.dtype == ms.int16
tensor = pytorch.ShortTensor([1, 2, 3])
assert tensor.shape == (3,)
assert tensor.dtype == ms.int16
zoulq commented 1 year ago
这个为什么是用ms的类型判断?
frelam commented 1 year ago
因为我们封的接口里, pytorch.int16= mstype.int16 , 所以这里用ms.int16来判断。
frelam commented 1 year ago
done
zoulq merged commit 923ea3ddc8 into master 1 year ago
The pull request has been merged as 923ea3ddc8.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.