File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change 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" : []
You can’t perform that action at this time.
0 commit comments