Created
July 17, 2020 17:03
-
-
Save prateekjoshi565/f8dde394ac17632499a9a68080ec7a7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## convert lists to tensors | |
train_seq = torch.tensor(tokens_train['input_ids']) | |
train_mask = torch.tensor(tokens_train['attention_mask']) | |
train_y = torch.tensor(train_labels.tolist()) | |
val_seq = torch.tensor(tokens_val['input_ids']) | |
val_mask = torch.tensor(tokens_val['attention_mask']) | |
val_y = torch.tensor(val_labels.tolist()) | |
test_seq = torch.tensor(tokens_test['input_ids']) | |
test_mask = torch.tensor(tokens_test['attention_mask']) | |
test_y = torch.tensor(test_labels.tolist()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment