CLRNet icon indicating copy to clipboard operation
CLRNet copied to clipboard

What's the use of generate_priors_from_embeddings in clr_head.forward?

Open xingyeshui opened this issue 2 years ago • 1 comments

https://github.com/Turoad/CLRNet/blob/7269e9d1c1c650343b6c7febb8e764be538b1aed/clrnet/models/heads/clr_head.py#L195-L196

When I delete the above code, the result will be:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

But I didn't find self.priors, self.priors_on_featmap were modified. So I want to know what's the use of generate_priors_from_embeddings in clr_head.forward or where wereself.priors, self.priors_on_featmap modified.

xingyeshui avatar Apr 28 '23 14:04 xingyeshui

this is where self.priors and self.priors_on_featmap is declare init_priors, priors_on_featmap = self.generate_priors_from_embeddings() #None, None self.register_buffer(name='priors', tensor=init_priors) self.register_buffer(name='priors_on_featmap', tensor=priors_on_featmap)

VietPT3502 avatar Dec 21 '23 04:12 VietPT3502