      def minibatch(self, data, batchsize):
          length = len(data)
          assert length >= batchsize, "Number of images is lower than batch-size (Note that too few images may lead to bad training). # images: {}, batch-size: {}".format(length, batchsize)
          epoch = i = 0
          shuffle(data)
          while True:
              size = batchsize
              if i+size > length:
                  shuffle(data)
                  i = 0
 
</s> remove     def minibatch(self, data, batchsize):
 </s> add     def minibatch(self, data, batchsize, doShuffle=True):
 </s> remove                 shuffle(data)
 </s> add                 if doShuffle:
                    shuffle(data)
 </s> remove     def minibatchAB(self, images, batchsize):
        batch = BackgroundGenerator(self.minibatch(images, batchsize), 1)
 </s> add     def minibatchAB(self, images, batchsize, doShuffle=True):
        batch = lib.utils.BackgroundGenerator(self.minibatch(images, batchsize, doShuffle), 1)

        if doShuffle:
            shuffle(data)

      def minibatch(self, data, batchsize):
          length = len(data)
          assert length >= batchsize, "Number of images is lower than batch-size (Note that too few images may lead to bad training). # images: {}, batch-size: {}".format(length, batchsize)
          epoch = i = 0
        if doShuffle:
            shuffle(data)
          while True:
              size = batchsize
              if i+size > length:
                  shuffle(data)
                  i = 0
keep keep keep keep replace keep keep keep keep keep
 Add timelapse functionality (#512)

* add new cli options

* add timelapse script

* add batch size on image generation

* fix circular dependency

* add attribute check

* refactor to 3 parameters

* fix some typos

* do not shuffle the set

* default to models folder when no timelapse output supplied

* almost forgot this 
lib/training_data.py