Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some confusion about the use of conv1d function in the gwnet class #14

Open
lx-eotk opened this issue May 3, 2020 · 3 comments
Open

Comments

@lx-eotk
Copy link

lx-eotk commented May 3, 2020

Hello,
Thank you for sharing the code of Graph WaveNet.

I have some confusion about the conv1d function using in your code.
Why use conv1d in gate_convs and how to understand that the kernel_size is a tuple (1, 2)?
Thanks

@sklin93
Copy link

sklin93 commented Jun 26, 2020

I think it's just the same as conv2d as it has a 2d kernel.
I was also very confused here so checked the pytorch source code, From https://github.com/pytorch/pytorch/blob/eebd492dcfb8d4152a5ba4240486f3df5aaf112d/torch/nn/modules/conv.py#L247 to https://github.com/pytorch/pytorch/blob/eebd492dcfb8d4152a5ba4240486f3df5aaf112d/torch/nn/modules/conv.py#L77, the kernel size is packed into weight shape, which is eventually used in https://github.com/pytorch/pytorch/blob/eebd492dcfb8d4152a5ba4240486f3df5aaf112d/torch/onnx/symbolic_opset9.py#L1068

Passing a (1,2) kernel to conv1d seems the same as pass a (1,2) kernel to conv2d as they trigger the same underlying computation.. (however pass a kernel=2 to conv1d and conv2d will be different as conv2d will repeat it 2 times)

It will be great if the author can answer here about the particular reason to choose conv1d for gate_convs while choosing conv2d for filter_convs...

@CYBruce
Copy link

CYBruce commented Jul 1, 2020

Have the same confusion.

@muratbayrktr
Copy link

I also have the same confusion

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

No branches or pull requests

4 participants