Loss and Accuracy calculation

Hi, I have a few questions.

  1. Where can I find this output variables (loss_mask, loss_rpn_box_reg, loss_classifier,loss_objectness, loss_box_reg) in which script are they defined?

Epoch: [1] [170/189] eta: 0:00:07 lr: 0.000100 loss: 0.6814 (0.8748) loss_classifier: 0.0554 (0.0661) loss_box_reg: 0.0693 (0.0586) loss_mask: 0.4453 (0.4971) loss_objectness: 0.0848 (0.2369) loss_rpn_box_reg: 0.0075 (0.0161) time: 0.4024 data: 0.0084 max mem: 7751

  1. Is this loss a total loss of trained model?
  2. Does torchvision has accuracy calculated as it has loss?

Your post doesn’t mention the used model or any other information, so I assume you are running the Object Detection tutorial. If so, then check this code to see how the metric is calculated.

Yes I’m using this Object detection tutorial and I used this fucntion train_one_epoch() for show the loss, but can I from there calculate accuracy?