MCPcopy 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
106def grad_mask(mask):
107 return mask[..., 1:, 1:] & mask[..., 1:, :-1] & mask[..., :-1, 1:]
108
109
110class GradL1Loss(nn.Module):

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected