MCPcopy
hub / github.com/hzwer/ECCV2022-RIFE / EPE

Class EPE

model/loss.py:10–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9
10class EPE(nn.Module):
11 def __init__(self):
12 super(EPE, self).__init__()
13
14 def forward(self, flow, gt, loss_mask):
15 loss_map = (flow - gt.detach()) ** 2
16 loss_map = (loss_map.sum(1, True) + 1e-6) ** 0.5
17 return (loss_map * loss_mask)
18
19
20class Ternary(nn.Module):

Callers 3

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected