Esempio n. 1
0
    def _batch_iterable(self, num_workers=0, **kwargs):
        """Return a batch-iteratorable

        See batch_iter for docs
        """
        dl = DataLoader(self,
                        batch_size=1,
                        collate_fn=numpy_collate_concat,
                        shuffle=False,
                        num_workers=num_workers,
                        drop_last=False)
        return dl
Esempio n. 2
0
    def _batch_iterable(self,
                        batch_size=32,
                        shuffle=False,
                        drop_last=False,
                        **kwargs):
        """See batch_iter docs

        Returns:
          iterable
        """
        dl = DataLoader(self,
                        batch_size=batch_size,
                        collate_fn=numpy_collate,
                        shuffle=shuffle,
                        num_workers=0,
                        drop_last=drop_last)
        return dl