Open gjyao opened 5 years ago
def __getitem__(self, index): inputLen = self.wordLength[index] return torch.cat((torch.tensor(self.wordInput[index], dtype=torch.float32), torch.zeros((gc.padding_len - len(self.wordInput[index]), gc.wordDim))), 0),\ torch.cat((torch.tensor(self.covarepInput[index], dtype=torch.float32), torch.zeros((gc.padding_len - len(self.covarepInput[index]), gc.shift_padding_len, gc.covarepDim))), 0),\ torch.cat((torch.tensor(self.covarepLength[index], dtype=torch.long), torch.zeros(gc.padding_len - len(self.covarepLength[index]), dtype=torch.long)), 0),\ torch.cat((torch.tensor(self.facetInput[index], dtype=torch.float32), torch.zeros((gc.padding_len - len(self.facetInput[index]), gc.shift_padding_len, gc.facetDim))), 0),\ torch.cat((torch.tensor(self.facetLength[index], dtype=torch.long), torch.zeros(gc.padding_len - len(self.facetLength[index]), dtype=torch.long)), 0),\ inputLen, torch.tensor(self.labelOutput[index]).squeeze()
When I ran main.py,I got this error. It seems like there's some problem in the overrride function getiem?
Hi, I am having the same problem. Any solution?
Hello,I meet the same problem,how did you specifically sove it?
When I ran main.py,I got this error. It seems like there's some problem in the overrride function getiem?