-
-
Save SannaPersson/f4f3163ca300d5888b094a90f92588ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
predictions[..., 1:3] = self.sigmoid(predictions[..., 1:3]) # x, y, coordinates | |
target[..., 3:5] = torch.log(1e-16 + target[..., 3:5] / anchors) # convert target width and height | |
box_loss = self.mse(predictions[..., 1:5][obj], target[..., 1:5][obj]) #index by obj to only apply loss for objects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment