在YOLOv8中,添加注意力机制时,遇到了这个问题,ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 128, 1, 1])
m.stride = torch.tensor([s / x.shape[-2] for x in forward(torch.zeros(1, ch, s, s))]) # forward将1改成2
YOLOv8ValueError: Expected more than 1 value per channel when training, got input size torch.Size(
最新推荐文章于 2024-04-26 15:47:14 发布