I am excited to see this post. I have found this problem, too. And I change the second parameter of
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?
I am looking forward to your response!  
QQ截图202003101606451084×796 36.3 KB