Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tejank10's full-sized avatar
🎯
Focusing

Tejan Karmali tejank10

🎯
Focusing
View GitHub Profile
def multiview_color_loss(predicts, targets_a, targets_b):
l1loss = nn.L1Loss()
loss = (l1loss(predicts[0][:, :3], targets_a[:, :3]) + \
l1loss(predicts[1][:, :3], targets_a[:, :3]) + \
l1loss(predicts[2][:, :3], targets_b[:, :3]) + \
l1loss(predicts[3][:, :3], targets_b[:, :3])) / 4
return loss