TCN icon indicating copy to clipboard operation
TCN copied to clipboard

Make local variables out of nn.sequential members for onnx exportability

Open fuzic opened this issue 6 years ago • 0 comments

The pytorch onnx exporter doesn't work if parameters are included as members of two modules. This means the pattern of having self.operator and passing self.operator to nn.sequential breaks the ability to export an onnx model.

This updates the TCN network to mirror the implementation of many other networks in pytorch where the operators passed to nn.Sequential are all local variables, and weight initialization is done at construction time to avoid the need for member variables for everything.

fuzic avatar Jul 09 '18 21:07 fuzic