From c5be7efd49cf4d5300848bd75209cc440b626d6c Mon Sep 17 00:00:00 2001 From: Bowen Zheng <57226275+zhengbw0324@users.noreply.github.com> Date: Tue, 26 Sep 2023 08:53:13 +0800 Subject: [PATCH] Update abstract_dataloader.py --- recbole/data/dataloader/abstract_dataloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recbole/data/dataloader/abstract_dataloader.py b/recbole/data/dataloader/abstract_dataloader.py index afa39a213..59f6398fd 100644 --- a/recbole/data/dataloader/abstract_dataloader.py +++ b/recbole/data/dataloader/abstract_dataloader.py @@ -136,8 +136,8 @@ def _set_neg_sample_args(self, config, dataset, dl_format, neg_sample_args): self.neg_sample_args = neg_sample_args self.times = 1 if ( - self.neg_sample_args["distribution"] == "uniform" - or self.neg_sample_args["distribution"] == "popularity" + (self.neg_sample_args["distribution"] == "uniform" + or self.neg_sample_args["distribution"] == "popularity") and self.neg_sample_args["sample_num"] != "none" ): self.neg_sample_num = self.neg_sample_args["sample_num"]