optimize-net icon indicating copy to clipboard operation
optimize-net copied to clipboard

Graphgen improvements

Open fmassa opened this issue 9 years ago • 0 comments

Should fix https://github.com/fmassa/optimize-net/issues/6 There is a lot of magic going on in here:

  • temporarily overwrite torch __index and select to keep track of the modules in which those functions were called (thanks upvalues !)
  • if the input tensors are not found in nodes table, look for them in the trickyNodes table, which contains the tensors created via __index and select during the forward call
  • additionally, remove the need of having to run forward before generating the graph to pre-allocate self.output, by adding the output edges after each module's call.

cc @szagoruyko

fmassa avatar Apr 12 '16 06:04 fmassa