From 73284ffeec08b338fb056dc36f3dab26ee8aa2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=85=AD?= Date: Wed, 23 Sep 2020 19:21:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug:=20=E5=95=86=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E4=BD=9C=E4=B8=BA=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=95=B4=E9=99=A4=E7=9A=84=E9=99=A4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index a83b0fd6..3abd5b2f 100644 --- a/utils.py +++ b/utils.py @@ -74,7 +74,7 @@ def __init__(self, batches, batch_size, device): self.batches = batches self.n_batches = len(batches) // batch_size self.residue = False # 记录batch数量是否为整数 - if len(batches) % self.n_batches != 0: + if len(batches) % batch_size != 0: self.residue = True self.index = 0 self.device = device