return [lang.word2index[word] for word in sentence.split(' ')] def tensorFromSentence(lang, sentence): indexes = indexesFromSentence(lang, sentence) indexes.append(EOS_token) return torch.tensor(indexes, dtype=torch.long, device=device).view(-1, 1) def tensorsFromPair(pair): input_tensor...
% Find the indexes for the faces to rotate ifMS(2,c)=='1' faces=find(sum(F>=.5-10^-5,1)==4); elseifMS(2,c)=='2' faces=find(sum(F<=.5+10^-5&&F>=-.5-10^-5,1)>4); else faces=find(sum(F<=-.5+10^-5,1)==4); ...
dataset.probe.masks_train = list(masks_probe[dataset.train_indexes]) dataset.probe.masks_test = list(masks_probe[dataset.test_indexes]) dataset.gallery.masks_train = list(masks_gallery[dataset.train_indexes]) dataset.gallery.masks_test = list(masks_gallery[dataset.test_indexes]) 开发者ID:AShed...