(self, idx)
| 138 | return len(self.occ) |
| 139 | |
| 140 | def __getitem__(self, idx): # occ: batch, seq, node |
| 141 | # Pseudo Sampling |
| 142 | prc_ch = torch.Tensor(self.prc[idx, :, :] * (1+self.prc_chg)) # [node, seq] |
| 143 | label_ch = torch.tan(torch.Tensor(self.label[idx, :] * (1+self.label_chg/self.law))) # [node, ] |
| 144 | |
| 145 | # to device |
| 146 | output_occ = torch.transpose(self.occ[idx, :, :], 0, 1).to(self.device) |
| 147 | output_prc = torch.transpose(self.prc[idx, :, :], 0, 1).to(self.device) |
| 148 | output_label = self.label[idx, :].to(self.device) |
| 149 | output_prc_ch = torch.transpose(prc_ch, 0, 1).to(self.device) |
| 150 | output_label_ch = label_ch.to(self.device) |
| 151 | return output_occ, output_prc, output_label, output_prc_ch, output_label_ch |
| 152 | |
| 153 | |
| 154 | class PseudoDataset(Dataset): |
nothing calls this directly
no outgoing calls
no test coverage detected