In general, the caffe log will print out two losses:
1. Iteration x, loss = …
2. Train net output #x: loss = …
The problem is only the second loss displays correctly when we use a python loss layer in pycaffe, which means in low-level c++ code, the smooth_loss is always zero in solver.cpp.
This problem comes out because the caffe doesn’t realize the python loss layer is a loss layer and then doesn’t receive the loss from it and treat it as an normal layer.
The solution is as simply as to modify one line of code in prototxt by adding loss_weight: 1 to the python loss layer. The both loss will display as expected.