MCPcopy Create free account
hub / github.com/csxmli2016/MARCONetPlusPlus / backward

Method backward

op/fused_act.py:80–90  ·  view source on GitHub ↗
(ctx, grad_output)

Source from the content-addressed store, hash-verified

78
79 @staticmethod
80 def backward(ctx, grad_output):
81 out, = ctx.saved_tensors
82
83 grad_input, grad_bias = FusedLeakyReLUFunctionBackward.apply(
84 grad_output, out, ctx.bias, ctx.negative_slope, ctx.scale
85 )
86
87 if not ctx.bias:
88 grad_bias = None
89
90 return grad_input, grad_bias, None, None
91
92
93class FusedLeakyReLU(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected