Skip to content

Commit 0a78cdc

Browse files
committed
Merge branch 'support_input_check' of https://github.com/Oneflow-Inc/oneflow into support_input_check
2 parents 656879e + 170a197 commit 0a78cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/oneflow/nn/modules/constant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def __init__(
4444
self.device = flow.device(self.device)
4545
self.requires_grad = requires_grad
4646
size = _single(size)
47-
assert (
48-
all(s >= 0 for s in size)
47+
assert all(
48+
s >= 0 for s in size
4949
), f"Trying to create tensor with negative dimension: {size}"
5050
if dtype is None:
5151
dtype = flow.get_default_dtype()

0 commit comments

Comments
 (0)