Fix bugs in TAS: missing ReLU in the end of each searching block

This commit is contained in:
D-X-Y
2020-04-09 06:19:31 +00:00
parent 569b9b406a
commit 076f9c2d41
9 changed files with 108 additions and 13 deletions

View File

@@ -153,7 +153,7 @@ class SimBlock(nn.Module):
else:
residual, expected_flop_c = inputs, 0
out = additive_func(residual, out)
return out, expected_next_inC, sum([expected_flop, expected_flop_c])
return nn.functional.relu(out, inplace=True), expected_next_inC, sum([expected_flop, expected_flop_c])
def basic_forward(self, inputs):
basicblock = self.conv(inputs)