optimize-net
optimize-net copied to clipboard
Graphgen improvements
Should fix https://github.com/fmassa/optimize-net/issues/6 There is a lot of magic going on in here:
- temporarily overwrite torch
__indexandselectto keep track of the modules in which those functions were called (thanks upvalues !) - if the
inputtensors are not found innodestable, look for them in thetrickyNodestable, which contains the tensors created via__indexandselectduring the forward call - additionally, remove the need of having to run forward before generating the graph to pre-allocate
self.output, by adding theoutputedges after each module's call.
cc @szagoruyko