deep-learning-with-pytorch / dlwpt-code

Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.
https://www.manning.com/books/deep-learning-with-pytorch
4.69k stars 1.98k forks source link

IndexError: list index out of range in p2ch10 #79

Closed ghost closed 2 years ago

ghost commented 2 years ago

After all the dataloader programming stuff, when I run

series_uid = findPositiveSamples
showCandidate(series_uid)

I receive Warning: no positive samples found; using first negative sample IndexError: list index out of range

Visual Code says the problem is in dsets.py

def __getitem__(self, ndx):
--> 138         candidate_info_tup = self.candidate_info_list[ndx]
    139         width_irc = (32, 48, 48)

Don't quite understand what's wrong