Beispiel #1
0
    def build_iter(self):

        ds = DataFromGenerator(self.generator)
        ds = RepeatedData(ds, -1)
        ds = BatchData(ds, self.batch_size)
        if not cfg.TRAIN.vis:
            ds = PrefetchDataZMQ(ds, self.process_num)
        ds.reset_state()
        ds = ds.get_data()
        return ds
Beispiel #2
0
def get_train_dataflow():
    train_datagen = image_generator_xd(size=config.IMAGE_SIZE,
                                       batchsize=config.BATCH,
                                       ks=range(NCSVS - 1),
                                       lw=config.LW)
    ds = DataFromGenerator(train_datagen)
    #ds = DataFromGeneratorRNG()
    #ds = PrefetchDataZMQ(ds, 12)
    return ds
    def build_iter(self):

        ds = DataFromGenerator(self.generator)
        ds = BatchData(ds, self.batch_size)
        ds = MultiProcessPrefetchData(ds, self.prefetch_size, self.process_num)
        ds.reset_state()
        ds = ds.get_data()
        return ds
Beispiel #4
0
    def build_iter(self):

        map_func = partial(self._map_func, is_training=self.training_flag)
        ds = DataFromGenerator(self.generator)
        ds = BatchData(ds, self.num_gpu * self.batch_size)
        ds = MultiProcessPrefetchData(ds, self.prefetch_size, self.process_num)
        ds.reset_state()
        ds = ds.get_data()
        return ds
    def build_iter(self, ):

        ds = DataFromGenerator(self.generator)

        if cfg.DATA.mutiscale and self.training_flag:
            ds = MutiScaleBatcher(ds,
                                  self.num_gpu * self.batch_size,
                                  scale_range=cfg.DATA.scales,
                                  input_size=(cfg.DATA.hin, cfg.DATA.win))
        else:
            ds = MutiScaleBatcher(ds,
                                  self.num_gpu * self.batch_size,
                                  input_size=(cfg.DATA.hin, cfg.DATA.win))

        ds = MultiProcessPrefetchData(ds, self.prefetch_size, self.process_num)
        ds.reset_state()
        ds = ds.get_data()
        return ds