What does Caffe Train/Test net output mean?

若如初见. 提交于 2019-12-12 13:07:40

问题


When training in Caffe, there are Train and Test net outputs for each iteration. I know this is the loss. However, is this the average loss over my batch or the total loss? And is this the same for both Classification and Regression?

For example, if I were to have a batch of 100 training examples and my loss over that iteration is 100, does that mean that the average loss per example is 1?


回答1:


Train loss is the averaged loss over the last training batch. That means that if you have 100 training examples in your mini-batch and your loss over that iteration is 100, then you have the average loss per example equals to 100.

Test loss is also an averaged loss but over all the test batches. You specify the test batch size and the number of testing iterations. Caffe will take #iter of such mini-batches, evaluate loss for them and provide you an averaged value. If #test_iter x batch_size == testset_size, you will have an averaged value across the full test set.



来源:https://stackoverflow.com/questions/41138334/what-does-caffe-train-test-net-output-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!