Repetition
lijain opened this issue · comments
Thank you for your public work, I find it interesting, I am reproducing your structure, but I have a few questions I would like you to answer:
- In the last two stages your pool stride is 1, and the avgPool is 3x3, s=1, padding=2? upsample How do you deal with any of them?
- The attention of the high-frequency component is several heads
hello, can you tell me how to implement the maxpool branch ? I feel confused about how to keep the size of feature map the same after maxpool operation. What is the configuration of maxpool and the linear layer after it ?
Thank you!
hello, can you tell me how to implement the maxpool branch ? I feel confused about how to keep the size of feature map the same after maxpool operation. What is the configuration of maxpool and the linear layer after it ? Thank you!
Reference:https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html .
torch.nn.MaxPool2d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
Shape:
Input:
Output:
where
Usually, we just set kernel_size=2
, default stride=kernel_size=2
, then we get nn.MaxPool2d(kernel_size=2)
, and the output will be the HALF of input. So, we can calculate the shape of output as below.
But when we are using the above code and setting the kernel_size=3
, stride=1
, padding=1
, then we get nn.MaxPool2d(kernel_size=3, stride=1, padding=1)
, and the output will be the SAME as input. So, we can calculate the shape of output as below.
@Ga-Lee Amazing!
@lijain We have released the code.