diff --git a/python/paddle/fluid/dataloader/batch_sampler.py b/python/paddle/fluid/dataloader/batch_sampler.py index 3debeecfe4f38209ea9080a1e9899d632ee55bfe..3a23c852563daacb54ebbf2fa642b9126e53fb3b 100644 --- a/python/paddle/fluid/dataloader/batch_sampler.py +++ b/python/paddle/fluid/dataloader/batch_sampler.py @@ -113,8 +113,6 @@ class BatchSampler(Sampler): assert not shuffle, "shuffle should be False when sampler is set" self.sampler = sampler else: - assert isinstance(dataset, Dataset), \ - "dataset should be a paddle.io.Dataset" assert not isinstance(dataset, IterableDataset), \ "dataset should not be a paddle.io.IterableDataset" assert sampler is None, \ diff --git a/python/paddle/fluid/reader.py b/python/paddle/fluid/reader.py index 727ceca72d1f1cfc0c34dae4e516568052136ba4..cbea289162c849b0efdca0ebfc48e0151dc1213e 100644 --- a/python/paddle/fluid/reader.py +++ b/python/paddle/fluid/reader.py @@ -332,8 +332,6 @@ class DataLoader(object): self.use_buffer_reader = use_buffer_reader self.worker_init_fn = worker_init_fn - assert isinstance(dataset, Dataset), \ - "dataset should be subclass instance of paddle.io.Dataset" self.dataset = dataset if not return_list and not in_dygraph_mode():