Closed praful1993 closed 2 months ago
Here my input image size is 3X64X512
DCA code is designed for square image sizes, you need to update the code such that it takes non-square inputs.
On Fri, Sep 1, 2023 at 5:37 AM Praful Hambarde @.***> wrote:
Here my input image size is 3X64X512
— Reply to this email directly, view it on GitHub https://github.com/gorkemcanates/Dual-Cross-Attention/issues/7#issuecomment-1702463973, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFOJR6MKEZGQFOBF3TRPX3XYGUEJANCNFSM6AAAAAA4HJHXBE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Regards, Gorkem Can Ates
Could you give some idea for code modification for non square input??
Hello,have you solved this problem?
You need to customize the output size in pool embedding to support non-square inputs.
I attempted to generate the model summary of your Unet model with the "attention=True" setting, and I encountered the following error. Did you incorporate a DCA block in your network?
File "Dual-Cross-Attention.py", line 1120, in
out = model(in1)
File "/home/praful/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, *kwargs)
File "Dual-Cross-Attention.py", line 1097, in forward
x11, x22, x33, x44 = self.DCA([x1, x2, x3, x4])
File "/home/praful/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(input, **kwargs)
File "Dual-Cross-Attention.py", line 884, in forward
x_out = self.m_sum(x, raw)
File "Dual-Cross-Attention.py", line 892, in m_sum
return [xi + xj for xi, xj in zip(x, y)]
return [xi + xj for xi, xj in zip(x, y)]
File "Dual-Cross-Attention.py", line 892, in
RuntimeError: The size of tensor a (512) must match the size of tensor b (64) at non-singleton dimension 2