The getlen method in the DataManager class incorrectly calculates the number of samples for a given class. Instead of counting the number of samples, it sums the indices of matching samples. It should be:
def getlen(self, index):
y = self._train_targets
return np.sum(y == index)
The
getlenmethod in the DataManager class incorrectly calculates the number of samples for a given class. Instead of counting the number of samples, it sums the indices of matching samples. It should be: