About PASCAL VOC dataset ,to generate val image

sundongwei: <p>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.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/0/4049e3a5cc34598855866cfc9252ba0f4a86af1a.png" data-download-href="https://discuss.pytorch.org/uploads/default/4049e3a5cc34598855866cfc9252ba0f4a86af1a" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/4049e3a5cc34598855866cfc9252ba0f4a86af1a_2_215x500.png" alt="image" data-base62-sha1="9aIRDq4LM9qiJJwqFISnFE44X5o" width="215" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/4049e3a5cc34598855866cfc9252ba0f4a86af1a_2_215x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/4049e3a5cc34598855866cfc9252ba0f4a86af1a_2_322x750.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/0/4049e3a5cc34598855866cfc9252ba0f4a86af1a_2_430x1000.png 2x" data-dominant-color="2F2F2F"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1090×2527 244 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

sundongwei: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/5/75f14954f8a92ad56aeb2041d6e0813089c3d568.png" data-download-href="https://discuss.pytorch.org/uploads/default/75f14954f8a92ad56aeb2041d6e0813089c3d568" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/5/75f14954f8a92ad56aeb2041d6e0813089c3d568.png" alt="image" data-base62-sha1="gPmOHWxFPUiago92nhRnqMNn2gE" width="690" height="142" data-dominant-color="151313"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1625×335 14.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

sundongwei: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/e/5eb9e1865a61f064a2287a1643e0d9429fb91ea4.png" data-download-href="https://discuss.pytorch.org/uploads/default/5eb9e1865a61f064a2287a1643e0d9429fb91ea4" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/5/e/5eb9e1865a61f064a2287a1643e0d9429fb91ea4.png" alt="image" data-base62-sha1="dvZ850l6SRjaTWbTttfZ5owll9a" width="690" height="338" data-dominant-color="161414"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1176×577 17.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

sundongwei: <p>this is part of code<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/c/7c7e619413b8d49021aa8d1fa9021999360f86ea.png" data-download-href="https://discuss.pytorch.org/uploads/default/7c7e619413b8d49021aa8d1fa9021999360f86ea" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/c/7c7e619413b8d49021aa8d1fa9021999360f86ea.png" alt="image" data-base62-sha1="hLjYyzaJteaTyfIco9ICXK1fRXQ" width="658" height="500" data-dominant-color="333131"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">770×585 24.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>Based on the error message it seems you are passing a <code>Tensor</code> to <code>splitext</code>, which expects a <code>str</code>, <code>bytes</code> or <code>os.PathLike</code> object instead.<br>
Check <code>impath</code> and make sure it’s one of the expected types.</p>
<p>PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier. <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"></p>

sundongwei: <p>really thanks , i have fixed  it~</p>