Book a Demo!
Store
Features
Docs
Share
Support
News
About
Policies
Sign Up
Sign In
yiming-wange
Edit Copy
Star
GitHub Repository:
yiming-wange/cs224n-2023-solution
Path:
blob/main/a3/a.ipynb
9
8
4
views
Kernel:
base
In [1]:
Copy
import
torch
In [7]:
Copy
q
=
torch
.
empty
(
5
,
5
)
torch
.
index_select
(
q
,
0
,
torch
.
tensor
(
[
1
,
3
,
3
]
)
)
Out[7]:
tensor([[0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.]])