shunxing1234
commited on
Commit
•
2c10640
1
Parent(s):
152ec2a
Update README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,7 @@ print(len(vocab))
|
|
52 |
|
53 |
text = "请给出10个要到北京旅游的理由。"
|
54 |
|
55 |
-
tokens =
|
56 |
|
57 |
tokens = torch.tensor(tokens)[None,].to("cuda:0")
|
58 |
|
|
|
52 |
|
53 |
text = "请给出10个要到北京旅游的理由。"
|
54 |
|
55 |
+
tokens = tokenizer.encode_plus(text)['input_ids'][:-1]
|
56 |
|
57 |
tokens = torch.tensor(tokens)[None,].to("cuda:0")
|
58 |
|