当在MMsegmentation中,使用DDRNet或PIDNet更换cocostuff或ade20k时出现错误RuntimeError: The size of tensor a (数字) must match the size of tensor b (数字-1) at non-singleton
以DDRNet为例,你需要将model/backbones/ddrnet.py中forword函数的第一句改为
out_size = (math.ceil(x.shape[-2] / 8), math.ceil(x.shape[-1] / 8))
朋友们,如果成功改好,请给我一个赞!!!也不枉我好多天的排错!!![哭]