Skip to content

Add group_conv2d_transpose_nchw to support groups argument - #8799

Closed
Lyken17 wants to merge 1 commit into
apache:mainfrom
Lyken17:patch-2
Closed

Add group_conv2d_transpose_nchw to support groups argument#8799
Lyken17 wants to merge 1 commit into
apache:mainfrom
Lyken17:patch-2

Conversation

@Lyken17

@Lyken17 Lyken17 commented Aug 19, 2021

Copy link
Copy Markdown
Contributor

As mentioned in #8182, TranposedConv2d is an important operator in GAN related applications and groups should also be supported for this operator. This PR was set to implement this missing feature.

However, there are parts I am still confusing

  • Which names should be used for the topi function?
    In topi.nn.conv2d, there are data, kernel, strides, padding, out_dtype, output_padding as well as Input, Filter, strides, padding, out_dtype, output_padding, which one should be used for newly added function?
  • Should we add a new function, or extend existing ones?
    In most DL frameoworks (e.g., PyTorch), conv2d is a unified function with support of various arguments such as padding, dilation, groups. But in topi, conv2d (w/o groups) and group_conv2d are two differnet function. While I understand this might be important to backward compability, I would recommend to merge these functions for simplicty.

Please comment if you have any thoughts. I will prepare unit tests after the discussion.

@vinx13

vinx13 commented Aug 23, 2021

Copy link
Copy Markdown
Member

Merging these functions sounds good to me. Note that we have unified operators in Relay level, it might be fine to lower to different topi operators if this is simpler

@Lyken17

Lyken17 commented Aug 24, 2021

Copy link
Copy Markdown
Contributor Author

@vinx13 What is relationship between topi.nn and relay.nn?

@vinx13

vinx13 commented Aug 24, 2021

Copy link
Copy Markdown
Member

relay.nn is graph level operator, topi.nn is the platform-aware implementation of each operator. There is a lowering rule registered here

def conv2d_strategy(attrs, inputs, out_type, target):

@vinx13

vinx13 commented Aug 31, 2021

Copy link
Copy Markdown
Member

@Lyken17 could you add a test case?

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