convnet-aig
convnet-aig copied to clipboard
Which part of the computation has been reduced?
As stated in the paper, the proposed convnet-aig can reduce computational cost. But after checking the source codes, I found each layer must be executed. The way you skip a single layer is by multiplying a mask (0 or 1) to the output. If that is the case, which part of the convnet-aig can reduce the computation?
The code below is cited from convnet_aig.py, line 152, where out
is the output of a layer, w[:,1]
is the mask.
out = self.shortcut(x) + out * w[:,1].unsqueeze(1)
I think its just a proof of concept. It shows that you would lose nothing, if you wouldnt execute the layers when the mask is 0. So its just an implementation detail to actually save on that computation