-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refine and align with pytorch #7593
Conversation
hjchen2
commented
Feb 24, 2022
•
edited
Loading
edited
- conv1d/2d/3d和deconv1d/2d/3d kernel,stride和dilation参数支持 int 传参
- 提供Tensor.zero_()接口
- Tensor.norm 参数命名
- flow.max和flow.min用法
- flow.nn.functional.dropout,支持inplace
- name: "max" | ||
signature: [ | ||
"TensorTuple (Tensor input, Int32 dim=None, Bool keepdim=False) => Max", | ||
"Tensor (Tensor input, Tensor other) => Max" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max看torch文档好像还有一个接口(输入输出都是一个tensor的那种?):
torch.max(input) → [Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"TensorTuple (Tensor input, Int32 dim=None, Bool keepdim=False) => Max", 这个就支持你说的那种,输出如果是TensorTuple,而且size是1的话,就自动会取第0个Tensor作为输出
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哦哦好的,忽略
@@ -1176,6 +1180,7 @@ def RegisterMethods(): | |||
Tensor.prod = _prod | |||
Tensor.sin = _sin | |||
Tensor.sin_ = _sin_inplace | |||
Tensor.zero_ = _zero_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们还有个地方是flow.zero_但是接口是flow.zeros_,也顺便改下吧
上下文在:#7573
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done,见commit 204dd3f
…neflow-Inc/oneflow into dev_align_with_pytorch_hjchen2
Static analysis with clang failed. PR label automerge has been removed |
CI failed when running job: cpu-module. PR label automerge has been removed |
Speed stats:
|
…neflow-Inc/oneflow into dev_align_with_pytorch_hjchen2
Speed stats:
|
* refine and align with pytorch * add flow.zero_ and check valid
* refine and align with pytorch * add flow.zero_ and check valid