作者您好,感谢你在分割上的工作。然而我在将执行
// Compute the classification cost. Contrary to the loss, we don't use the NLL,
// but approximate it in 1 - proba[target class].
// The 1 is a constant that doesn't change the matching, it can be ommitted.
cost_class = -out_prob[:, tgt_ids] 时代码报错。
作者您好,感谢你在分割上的工作。然而我在将执行 // Compute the classification cost. Contrary to the loss, we don't use the NLL, // but approximate it in 1 - proba[target class]. // The 1 is a constant that doesn't change the matching, it can be ommitted. cost_class = -out_prob[:, tgt_ids] 时代码报错。
我做了详细的输出: out_prob shape: torch.Size([100, 172]) tgt_ids: tensor([ 8, 96, 127, 143, 156, 168, 177], device='cuda:0') 发现tgt_ids预测了177类,这是什么原因导致的。我看您的config.py文件配置cfg.MODEL.SAN.NUM_CLASSES = 171请问我该如何解决这个问题,期待您的回复