We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 656879e + 170a197 commit 0a78cdcCopy full SHA for 0a78cdc
python/oneflow/nn/modules/constant.py
@@ -44,8 +44,8 @@ def __init__(
44
self.device = flow.device(self.device)
45
self.requires_grad = requires_grad
46
size = _single(size)
47
- assert (
48
- all(s >= 0 for s in size)
+ assert all(
+ s >= 0 for s in size
49
), f"Trying to create tensor with negative dimension: {size}"
50
if dtype is None:
51
dtype = flow.get_default_dtype()
0 commit comments