automl icon indicating copy to clipboard operation
automl copied to clipboard

Loss NaN

Open phucnhs opened this issue 6 years ago • 5 comments

Thanks you source code ! I use custom dataset with 5 class + model name efficientdet-d0 , I got an error NaN when i set --ckpt = "efficientdet-d0" or set --backbone_ckpt="efficientnet-d0" for training . I downloaded ckpt from source code . When i not use --ckpt =None or --backbone_ckpt=None -> NaN doesn't happen Where is the problem? Thanks !

phucnhs avatar Mar 31 '20 07:03 phucnhs

Please post the full command you ran and the platform your training on

Ely-S avatar Mar 31 '20 19:03 Ely-S

  • Command python main.py --training_file_pattern=tfrecord/.tfrecord --model_dir=./tmp/ --model_name=efficientdet-d0 --backbone_ckpt=efficientnet-b0 --hparams="use_bfloat16=false" --use_tpu=False python main.py --training_file_pattern=tfrecord/.tfrecord --model_dir=./tmp/ --model_name=efficientdet-d0 --ckpt=efficientdet-d0 --hparams="use_bfloat16=false,var_exclude_expr = r'./class-predict/.'" --use_tpu=False
  • I use tensorflow-gpu 1.15 , card RTX2080ti

phucnhs avatar Apr 01 '20 02:04 phucnhs

  • Command python main.py --training_file_pattern=tfrecord/.tfrecord --model_dir=./tmp/ --model_name=efficientdet-d0 --backbone_ckpt=efficientnet-b0 --hparams="use_bfloat16=false" --use_tpu=False python main.py --training_file_pattern=tfrecord/.tfrecord --model_dir=./tmp/ --model_name=efficientdet-d0 --ckpt=efficientdet-d0 --hparams="use_bfloat16=false,var_exclude_expr = r'./class-predict/.'" --use_tpu=False
  • I use tensorflow-gpu 1.15 , card RTX2080ti

try changing line number 51 and 52 in hparams_config.py to h.learning_rate = 0.001 h.lr_warmup_init = 0.0001

vamshi-vk avatar Apr 06 '20 09:04 vamshi-vk

Thanks ! i will close issues

phucnhs avatar Apr 06 '20 09:04 phucnhs

I met the same issue about NaN loss. I decrease the learning rate from 0.08---> 0.01, and the same error. Thanks.

elesun2018 avatar Apr 28 '20 15:04 elesun2018