From 170a197bab0eb6e8400d58f4f76b422ed48ad766 Mon Sep 17 00:00:00 2001 From: oneflow-ci-bot Date: Tue, 28 May 2024 08:32:40 +0000 Subject: [PATCH] auto format by CI --- python/oneflow/nn/modules/constant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/oneflow/nn/modules/constant.py b/python/oneflow/nn/modules/constant.py index cd135894cbd..c2ac7762344 100644 --- a/python/oneflow/nn/modules/constant.py +++ b/python/oneflow/nn/modules/constant.py @@ -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()