We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7f5385 commit ee77ccbCopy full SHA for ee77ccb
torch/nn/quantized/modules/activation.py
@@ -31,10 +31,10 @@ class ReLU(torch.nn.ReLU):
31
"""
32
def __init__(self, inplace=False):
33
super(ReLU, self).__init__(inplace)
34
- assert not inplace, 'torch.nn.quantized.ReLU does not support inplace'
+ self.inplace = inplace
35
36
def forward(self, input):
37
- return torch.nn.quantized.functional.relu(input)
+ return torch.nn.quantized.functional.relu(input, inplace=self.inplace)
38
39
def _get_name(self):
40
return 'QuantizedReLU'
0 commit comments