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

input1 must be CUDA tensor #33

Open
aradhyamathur opened this issue Oct 1, 2024 · 0 comments
Open

input1 must be CUDA tensor #33

aradhyamathur opened this issue Oct 1, 2024 · 0 comments

Comments

@aradhyamathur
Copy link

Hi, while passing a random tensor using the following code through the quadtree , I received the error shown below
Code:

arr = torch.randn(3, 32*32, 256)
block  = Block(256, 8, sr_ratio=2, topks=[32, 32, 32, 32])
out = block(arr, 32, 32)

where the block is a detection quadtree block , can you please guide ? Thanks.
Error :

Cell In[196], [line 113](vscode-notebook-cell:?execution_count=196&line=113)
    [110](vscode-notebook-cell:?execution_count=196&line=110)         else:
    [111](vscode-notebook-cell:?execution_count=196&line=111)             v = F.avg_pool2d(v, kernel_size=2, stride=2)
--> [113](vscode-notebook-cell:?execution_count=196&line=113) msg = self.py_att(queries, keys, values).contiguous().view(B, -1, C)
    [115](vscode-notebook-cell:?execution_count=196&line=115) x = self.proj(msg)
    [116](vscode-notebook-cell:?execution_count=196&line=116) x = self.proj_drop(x)


RuntimeError: input1 must be a CUDA tensor

This error occurs when sr_ratio > 1 does it not handle the list internally ?

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

1 participant