Code error in pytorch official tutorial about tensorboard

Old5: <p>I am new to pytorch, so I hope to get familiar with it quickly with official tutorials. When follow tutorial about tensorboard(url: <a href="https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html" rel="nofollow noopener">https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html</a>) ,  I find a possible code error in part 6. Assessing trained models with Tensorboard.<br>
The code in add_pr_curve_tensorboard() uses writer.add_pr_curve() in a wrong way. According to the definition, the second parameters of writer.add_pr_curve() should be the ground truth data instead of prediction labels.<br>
I think it may mislead others who are not familiar with the precision-recall curve. It would be great if we could correct this.<br>
Anyway, thanks a lot for providing such good tutorials to beginners!</p>

ptrblck: <p>Could you please comment on <a href="https://github.com/pytorch/tutorials/issues/852">this issue</a>?</p>

WYBupup: <p>I am excited to see this post. I have found this problem, too. And I change the second parameter of<br>
writer.add_pr_curve() from “test_preds == class_index” to “testset.targets == class_index”. And I got terrible percision-Recall curve(showed in the following picture). I just wonder if you have corrected the error in the tutorial and run the code you corrected. If you have, was the pr curve you got same as mine?<br>
I am looking forward to your response! <img src="https://discuss.pytorch.org/images/emoji/apple/grinning.png?v=12" title=":grinning:" class="emoji" alt=":grinning:" loading="lazy" width="20" height="20"> <img src="https://discuss.pytorch.org/images/emoji/apple/grinning.png?v=12" title=":grinning:" class="emoji" alt=":grinning:" loading="lazy" width="20" height="20"><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/5/25b97d815bf4244fedc27becd385b71aa9d06165.png" data-download-href="https://discuss.pytorch.org/uploads/default/25b97d815bf4244fedc27becd385b71aa9d06165" title="QQ截图20200310160645"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25b97d815bf4244fedc27becd385b71aa9d06165_2_680x500.png" alt="QQ截图20200310160645" data-base62-sha1="5nJ4NHoDcVlREAZlg4Se7z4oAkt" width="680" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25b97d815bf4244fedc27becd385b71aa9d06165_2_680x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25b97d815bf4244fedc27becd385b71aa9d06165_2_1020x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/2/5/25b97d815bf4244fedc27becd385b71aa9d06165.png 2x" data-dominant-color="ECEAE7"><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">QQ截图20200310160645</span><span class="informations">1084×796 36.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>

Old5: <p>I am sorry for the late reply. The issue on github provides a correct way same as me. It should be a exact code error in the tutorial. I will comment the issue on github right away.<br>
As a new user, I’m not sure how to make this topic solved. It would be great if you can help me out. Thanks a lot!</p>