CenterNet-tensorflow icon indicating copy to clipboard operation
CenterNet-tensorflow copied to clipboard

nan loss

Open martinbacsi opened this issue 7 years ago • 5 comments

without modifying any config after few epochs (4, 5) I got nan loss. If I reduce the batch size it reaches nan even earlier. I use tf version 1.13.1

martinbacsi avatar Jun 14 '19 10:06 martinbacsi

you could pretrained backone on imagnet. and if batch size is too small, you could freeze the batch norm parameters. if the batch size is too small, batch norm could not helpful

Stick-To avatar Jun 14 '19 12:06 Stick-To

I'll try. If you could maybe provide a pretrained model, it would be very useful.

martinbacsi avatar Jun 17 '19 07:06 martinbacsi

https://drive.google.com/open?id=1Jcisme-ktAXvldU_FTlDDE_ZrvfVVwxy pretrained parameters on imagenet with several epochs

Stick-To avatar Jun 17 '19 11:06 Stick-To

Thank you! Unfortunately I wasn't able to load the checkpoint. The error message is the following:

Traceback (most recent call last): File "C:\Users\Martin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "C:\Users\Martin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "C:\Users\Martin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: Key backone/batch_normalization/moving_mean not found in checkpoint [[{{node save_1/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]]

martinbacsi avatar Jun 17 '19 13:06 martinbacsi

I only save trainable parameters, use load_pretrained_weight function

Stick-To avatar Jun 18 '19 08:06 Stick-To