i train pascal voc dataset by my model in semantic segmentation. then i load model.pth to generate val image , but got a error.however, i use the same code to generate val image in cityscapes dataset is OK.
Based on the error message it seems you are passing a Tensor to splitext, which expects a str, bytes or os.PathLike object instead.
Check impath and make sure it’s one of the expected types.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier. 
1 Like
really thanks , i have fixed it~



