Loss map don't update using vsidom

When I use visdom to produce the loss map, the map seems don’t update. As show in the below pictures, althoguh the loss of epoch 39 is caculated, the loss map only show the 31 epoch. Is there someone meet the same problem?

The second picture showes that it have caculated the loss of epoch39.

Could you post the code where you try to append the loss values to the plot in visdom?

This is the code used to append the loss.
When I trian the modle on the COCO train set (118K images), the problem appeares. However, when I trian the modle on the COCO val set(5k iamges ), everything is ok.
It may be something relevant to the interval time???

Are you sure the condition is True for the train set?

if (iteration % epoch_size == 0):

Also, it’s better to post code directly, because we could run and debug it.
You can add code snippets using three backticks `.