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

About the padding size of the Series Informed Activation Function #4

Open
66Kevin opened this issue May 25, 2023 · 3 comments
Open

Comments

@66Kevin
Copy link

66Kevin commented May 25, 2023

Hi,
Thanks for your amazing work!
I found the padding size used in activation funtion is actually same as padding=self.act_num, so can i ask why you use padding=(self.act_num*2+1)//2 instead of padding=self.act_num? It seems could both guarded the input size is equal to output size after the DW-conv.

Best,
Yueyi

@HantingChen
Copy link
Collaborator

Thank for the nice suggestion! We have fixed this.

@66Kevin
Copy link
Author

66Kevin commented May 26, 2023

Thank for the nice suggestion! We have fixed this.

Thanks for your reply! There is also a question about Series Informed Activation Function. Why the number of stacked activation function can be implemented in act_num in the following code snippet? It seems only enlarge the kernel size and how to achieve the goal of stacking activtion function? Thanks for your patient!
self.weight = torch.nn.Parameter(torch.randn(dim, 1, act_num * 2 + 1, act_num * 2 + 1))

Best,
Yueyi

@HantingChen
Copy link
Collaborator

Thanks for your question! By enlarging the kernel size in the code, we are effectively aggregating outputs from the activation function at different positions. This essentially achieves the stacking of the activation function. Although it may seem counterintuitive at first, it is simply an implementation strategy to achieve our goal. Please feel free to ask if you have more questions!

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

2 participants