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

Method forward

op/fused_act.py:64–77  ·  view source on GitHub ↗
(ctx, input, bias, negative_slope, scale)

Source from the content-addressed store, hash-verified

62class FusedLeakyReLUFunction(Function):
63 @staticmethod
64 def forward(ctx, input, bias, negative_slope, scale):
65 empty = input.new_empty(0)
66
67 ctx.bias = bias is not None
68
69 if bias is None:
70 bias = empty
71
72 out = fused.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
73 ctx.save_for_backward(out)
74 ctx.negative_slope = negative_slope
75 ctx.scale = scale
76
77 return out
78
79 @staticmethod
80 def backward(ctx, grad_output):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected