I have no idea how to get the return value of the class function
i am new in the python kindly answer me i am tired…
class Dataset(torch.utils.data.Dataset):
def __init__(self, csv_file, root_dir, transform=None):
self.csv = pd.read_csv(csv_file)
self.root = root_dir
self.transform = transform
def __len__(self):
return len(self.csv)
def __getitem__(self,idx):
img_name=self.csv.iloc[idx,0]
landmarks =self.csv.iloc[idx, 4:].as_matrix()
return img_name,landmarks
dataset = Dataset(csv_file='Dataset/loclization.csv', root_dir='Dataset/local/')
i need to get img_name and landmarks