Skip to content
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

Fix where module bug #5300

Merged
merged 30 commits into from
Jun 25, 2021
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
249d020
fix bert backward bug
BBuf Jun 8, 2021
72c3ec6
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 9, 2021
aef184f
fix argwhere module bug
BBuf Jun 9, 2021
9274a82
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 10, 2021
16cd4dd
align dropout module with torch
BBuf Jun 10, 2021
18b70d7
fix conflict
BBuf Jun 10, 2021
5c3e5fe
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 13, 2021
7281b0e
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 15, 2021
6842fa1
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 17, 2021
0190aa0
fix acosh ci bug
BBuf Jun 17, 2021
2c3779f
fix conflict
BBuf Jun 18, 2021
3e0c27a
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 18, 2021
e452c81
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 18, 2021
00d33ce
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 20, 2021
7333881
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 21, 2021
1373ee8
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 22, 2021
639f1de
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 22, 2021
801acf7
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
BBuf Jun 23, 2021
84c60a9
fix where module bug
BBuf Jun 24, 2021
0d5414d
Merge branch 'master' into fix_where_module_bug
BBuf Jun 24, 2021
f4a74a2
fix comments
BBuf Jun 24, 2021
de08aff
Merge branch 'fix_where_module_bug' of https://github.com/Oneflow-Inc…
BBuf Jun 24, 2021
6200abb
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 24, 2021
56319f1
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 24, 2021
636d73f
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 24, 2021
7b8d23f
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 24, 2021
686fbfa
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 24, 2021
619a34f
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 25, 2021
9e73b2f
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 25, 2021
7709b36
Merge branch 'master' into fix_where_module_bug
oneflow-ci-bot Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions oneflow/python/nn/modules/where.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def forward(self, condition, x, y):
condition.device.type == x.device.type
and condition.device.type == y.device.type
)

assert len(condition.shape) == len(x.shape) and len(condition.shape) == len(
y.shape
), f"The dim of where module's inputs can not match, please check!"

broadcast_cond = condition
broadcast_x = x
broadcast_y = y
Expand Down