MCPcopy
hub / github.com/ddbourgin/numpy-ml / TorchLinearActivation

Class TorchLinearActivation

numpy_ml/tests/nn_torch_models.py:124–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123
124class TorchLinearActivation(nn.Module):
125 def __init__(self):
126 super(TorchLinearActivation, self).__init__()
127 pass
128
129 @staticmethod
130 def forward(input):
131 return input
132
133 @staticmethod
134 def backward(grad_output):
135 return torch.ones_like(grad_output)
136
137
138class TorchBatchNormLayer(nn.Module):

Callers 8

test_FullyConnectedFunction · 0.85
test_MultiplyLayerFunction · 0.85
test_AddLayerFunction · 0.85
test_Conv2DFunction · 0.85
test_Conv1DFunction · 0.85
test_Deconv2DFunction · 0.85

Calls

no outgoing calls

Tested by 8

test_FullyConnectedFunction · 0.68
test_MultiplyLayerFunction · 0.68
test_AddLayerFunction · 0.68
test_Conv2DFunction · 0.68
test_Conv1DFunction · 0.68
test_Deconv2DFunction · 0.68