Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/thygate/stable-diffusion-webui-depthmap-script
/ grad_mask
Function
grad_mask
dzoedepth/trainers/loss.py:106–107 ·
view source on GitHub ↗
(mask)
Source
from the content-addressed store, hash-verified
104
105
106
def
grad_mask(mask):
107
return
mask[..., 1:, 1:] & mask[..., 1:, :-1] & mask[..., :-1, 1:]
108
109
110
class
GradL1Loss(nn.Module):
Callers
1
forward
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected