Skip to content

Commit a25b85a

Browse files
committed
Starting to separate loss from model.
1 parent e34c310 commit a25b85a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/YOLOLoss.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from torch import nn
2+
3+
4+
class YOLOLoss(nn.Module):
5+
def __init__(self):
6+
super(YOLOLoss, self).__init__()
7+
self.mse_loss = nn.MSELoss() # For Bounding Box Prediction
8+
self.bce_loss = nn.BCELoss() # For Class Prediction
9+
10+
def forward(self, x, y):
11+
return

0 commit comments

Comments
 (0)