Skip to content

Commit d15542c

Browse files
committed
feat(fcs-pytorch): init pytorch fcs
1 parent a55fa32 commit d15542c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flashcards/pytorch.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Reshape tensor `x` from 2x4 to 4x2; x=x.view(4,2)
2+
Reshape tensor `x` to 5 rows; x=x.view(5,-1)
3+
What does the -1 in x.view(-1) refer to?; infer dimension
4+
5+
How to set up autodifferentiation; Set up tensor with requires_grad=True: `x=torch.Tensor([2,3], requires_grad=True)` then do operations on x. Can also set via `x.requires_grad = True`.
6+
7+

0 commit comments

Comments
 (0)