diff --git a/mala/network/trainer.py b/mala/network/trainer.py index 48b9680bd..ead4b4d5c 100644 --- a/mala/network/trainer.py +++ b/mala/network/trainer.py @@ -672,7 +672,7 @@ def __prepare_to_train(self, optimizer_dict): ) if self.parameters_full.use_distributed_sampler_test: - if self.data.test_data_sets is not None: + if self.data.test_data_sets: self.test_sampler = ( torch.utils.data.distributed.DistributedSampler( self.data.test_data_sets[0],