Skip to content

Conversation

fuzic
Copy link

@fuzic fuzic commented Jul 9, 2018

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.

Copy link

@david-waterworth david-waterworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is init_weights correct? It seems to be accessing undefined local variables conv1 and conv2?

Nevermind - I didn't notice you'd merged in into the constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants