Skip to content

AttributeError: 'list' object has no attribute 'shape'? #5

@baiye1248

Description

@baiye1248

anchors, shape = self.anchors[i], p[i].shape,code error'list' object has no attribute 'shape'。

I trained with the coco dataset, taking into account the conversion problem, using the following code:
anchors, shape = self.anchors[i],torch.tensor(list((p.cpu().detach().numpy() for p in p[i]))).cuda().shape

But an error was reported ValueError: expected sequence of length 80 at dim 3 (got 40),What is the solution?

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