Skip to content

about_CC.py #6

@ghost

Description

hello i met this problem and please u to see .
1 x = torch.randn(2,64,5,6)
2
----> 3 y = model(x)

1 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
475 result = self._slow_forward(*input, **kwargs)
476 else:
--> 477 result = self.forward(*input, **kwargs)
478 for hook in self._forward_hooks.values():
479 hook_result = hook(self, input, result)

in forward(self, x)
24 proj_value_H = proj_value.permute(0,3,1,2).contiguous().view(m_batchsizewidth,-1,height)
25 proj_value_W = proj_value.permute(0,2,1,3).contiguous().view(m_batchsize
height,-1,width)
---> 26 energy_H = (torch.bmm(proj_query_H, proj_key_H)+self.INF(m_batchsize, height, width)).view(m_batchsize,width,height,height).permute(0,2,1,3)
27 energy_W = torch.bmm(proj_query_W, proj_key_W).view(m_batchsize,height,width,width)
28 concate = self.softmax(torch.cat([energy_H, energy_W], 3))

RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #3 'other'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions