Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ZhengPeng7/BiRefNet
/ __init__
Method
__init__
loss.py:90–91 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
88
89
class
StructureLoss(torch.nn.Module):
90
def
__init__(self):
91
super(StructureLoss, self).__init__()
92
93
def
forward(self, pred, target):
94
weit = 1+5*torch.abs(F.avg_pool2d(target, kernel_size=31, stride=1, padding=15)-target)
Callers
nothing calls this directly
Calls
1
__init__
Method · 0.45
Tested by
no test coverage detected