Skip to content

Commit 632151d

Browse files
Update 06.ipynb
1 parent d0a9ed3 commit 632151d

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

06.ipynb

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,55 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 1,
66
"id": "36b201f6-5ca0-4a27-80ba-52002d17fd8d",
7+
"metadata": {
8+
"tags": []
9+
},
10+
"outputs": [],
11+
"source": [
12+
"import torch.nn.functional as F"
13+
]
14+
},
15+
{
16+
"cell_type": "code",
17+
"execution_count": 3,
18+
"id": "51230b85-9fb5-439b-b70a-2908b598341f",
19+
"metadata": {
20+
"tags": []
21+
},
22+
"outputs": [],
23+
"source": [
24+
"import torchtext.functional as F\n"
25+
]
26+
},
27+
{
28+
"cell_type": "code",
29+
"execution_count": 7,
30+
"id": "46206105-8864-4466-b1eb-1df21696cccf",
31+
"metadata": {
32+
"tags": []
33+
},
34+
"outputs": [
35+
{
36+
"data": {
37+
"text/plain": [
38+
"tensor([1, 2, 3])"
39+
]
40+
},
41+
"execution_count": 7,
42+
"metadata": {},
43+
"output_type": "execute_result"
44+
}
45+
],
46+
"source": [
47+
"F.to_tensor([1,2,3],padding_value=5)"
48+
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": null,
53+
"id": "6dbd7aae-0a59-457e-b33e-465d1eb153c1",
754
"metadata": {},
855
"outputs": [],
956
"source": []

0 commit comments

Comments
 (0)