Skip to content

Commit

Permalink
Merge branch 'support_input_check' of https://github.com/Oneflow-Inc/…
Browse files Browse the repository at this point in the history
…oneflow into support_input_check
  • Loading branch information
Dmovic committed May 29, 2024
2 parents 656879e + 170a197 commit 0a78cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/oneflow/nn/modules/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def __init__(
self.device = flow.device(self.device)
self.requires_grad = requires_grad
size = _single(size)
assert (
all(s >= 0 for s in size)
assert all(
s >= 0 for s in size
), f"Trying to create tensor with negative dimension: {size}"
if dtype is None:
dtype = flow.get_default_dtype()
Expand Down

0 comments on commit 0a78cdc

Please sign in to comment.