Yet-Another-EfficientDet-Pytorch icon indicating copy to clipboard operation
Yet-Another-EfficientDet-Pytorch copied to clipboard

WARNING: root: NaN or Inf found in input tensor.

Open debparth opened this issue 4 years ago • 5 comments

I'm having very small dataset of only 100 Images in Training and 10 Images in Val.

My YML is: `project_name: technical_names train_set: train val_set: val num_gpus: 1

mean: [ 0.485, 0.456, 0.406 ] std: [ 0.229, 0.224, 0.225 ]

anchors_scales: '[2 ** 0, 2 ** (1.0 / 3.0), 2 ** (2.0 / 3.0)]' anchors_ratios: '[(1.0, 1.0), (1.3, 0.8), (1.9, 0.5)]'

obj_list: [ '1', '2' ] ` When I'm trying to train it with d0 model. It is giving me following error and not even training. image

debparth avatar Feb 13 '21 08:02 debparth

Hello, I have the same problem, probably because the data set is too small. If you do not solve it, try the best data enhancement.

zuofengyuan1 avatar Feb 15 '21 15:02 zuofengyuan1

Then @zuofengyuan-web will 300 Images for Training would be good!?

debparth avatar Feb 15 '21 17:02 debparth

@debparth almost impossible, most likely overfitting

zylo117 avatar Feb 20 '21 01:02 zylo117

@zylo117 any idea how to solve this problem without overfitting? and also without getting this WARNING!?

debparth avatar Feb 20 '21 04:02 debparth

I'm having very small dataset of only 100 Images in Training and 10 Images in Val.

My YML is: `project_name: technical_names train_set: train val_set: val num_gpus: 1

mean: [ 0.485, 0.456, 0.406 ] std: [ 0.229, 0.224, 0.225 ]

anchors_scales: '[2 ** 0, 2 ** (1.0 / 3.0), 2 ** (2.0 / 3.0)]' anchors_ratios: '[(1.0, 1.0), (1.3, 0.8), (1.9, 0.5)]'

obj_list: [ '1', '2' ] ` When I'm trying to train it with d0 model. It is giving me following error and not even training. image

Reducing the batch size works for small dataset

Muhibullah1 avatar Sep 01 '23 03:09 Muhibullah1