Open wenhe-jia opened 7 years ago
I have same problem
same problem,too.
I have same problem,too.
same problem here
I add a while loop in image.py:
def next(self): ... try: while i < batch_size: label, s = self.next_sample() data = self.imdecode(s) try: self.check_valid_image(data) except RuntimeError as e: logging.debug('Invalid image, skipping: %s', str(e)) continue data = self.augmentation_transform(data) assert i < batch_size, 'Batch size must be multiples of augmenter output length' batch_data[i] = self.postprocess_data(data) batch_label[i] = label i += 1 except StopIteration: if not i: raise StopIteration while i < batch_size: import copy batch_data[i] = copy.deepcopy(batch_data[0]) batch_label[i] = copy.deepcopy(batch_label[0]) i += 1 ...
I copy the first batch_szie-i times, It can works.
I was training binary classification using .rec , met the same problem
Maybe we should make our .rec files in our own ways to make sure it has no problem.
@mxnet-label-bot add [Metric]
@LeonJWH @techzhou @changss @tobechao @wlbksy can one of please share a minimum reproducible example for this bug?
Hi ,I am training a binary classification model with my own dataset. I use mx.image.ImageIter API to load raw images according to the .lst file generated myself(without using img2rec.py). I set the data iter as below,
And my .lst file is
Then i start training, the first epoch went well, but a error was reported at the second epoch(epoch 1) as follow,
batch 3766 is the second last batch of a epoch, and batch 3767 is the last batch of a epoch. I set the eval metric in my training script with two components:
so what is wrong in my usage? Thx for your answer!