Skip to content

Commit 5070c12

Browse files
committed
update file
1 parent 67e077d commit 5070c12

File tree

1 file changed

+23
-29
lines changed

1 file changed

+23
-29
lines changed

notes/19-卷积层.md

+23-29
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ corr2d(X,K)
2727

2828

2929

30-
tensor([[19., 25.],
31-
[37., 43.]])
30+
>>> tensor([[19., 25.],
31+
[37., 43.]])
3232

3333

3434

@@ -54,7 +54,7 @@ X
5454

5555

5656

57-
tensor([[1., 1., 0., 0., 0., 0., 1., 1.],
57+
>>> tensor([[1., 1., 0., 0., 0., 0., 1., 1.],
5858
[1., 1., 0., 0., 0., 0., 1., 1.],
5959
[1., 1., 0., 0., 0., 0., 1., 1.],
6060
[1., 1., 0., 0., 0., 0., 1., 1.],
@@ -73,12 +73,12 @@ Y
7373

7474

7575

76-
tensor([[ 0., -1., 0., 0., 0., 1., 0.],
77-
[ 0., -1., 0., 0., 0., 1., 0.],
78-
[ 0., -1., 0., 0., 0., 1., 0.],
79-
[ 0., -1., 0., 0., 0., 1., 0.],
80-
[ 0., -1., 0., 0., 0., 1., 0.],
81-
[ 0., -1., 0., 0., 0., 1., 0.]])
76+
>>> tensor([[ 0., -1., 0., 0., 0., 1., 0.],
77+
[ 0., -1., 0., 0., 0., 1., 0.],
78+
[ 0., -1., 0., 0., 0., 1., 0.],
79+
[ 0., -1., 0., 0., 0., 1., 0.],
80+
[ 0., -1., 0., 0., 0., 1., 0.],
81+
[ 0., -1., 0., 0., 0., 1., 0.]])
8282

8383

8484

@@ -90,14 +90,14 @@ corr2d(X.t(),K)
9090

9191

9292

93-
tensor([[0., 0., 0., 0., 0.],
94-
[0., 0., 0., 0., 0.],
95-
[0., 0., 0., 0., 0.],
96-
[0., 0., 0., 0., 0.],
97-
[0., 0., 0., 0., 0.],
98-
[0., 0., 0., 0., 0.],
99-
[0., 0., 0., 0., 0.],
100-
[0., 0., 0., 0., 0.]])
93+
>>> tensor([[0., 0., 0., 0., 0.],
94+
[0., 0., 0., 0., 0.],
95+
[0., 0., 0., 0., 0.],
96+
[0., 0., 0., 0., 0.],
97+
[0., 0., 0., 0., 0.],
98+
[0., 0., 0., 0., 0.],
99+
[0., 0., 0., 0., 0.],
100+
[0., 0., 0., 0., 0.]])
101101

102102

103103

@@ -118,11 +118,11 @@ for i in range(10):
118118
print(f'batch {i+1}, loss {l.sum():.3f}')
119119
```
120120

121-
batch 2, loss 3.852
122-
batch 4, loss 1.126
123-
batch 6, loss 0.386
124-
batch 8, loss 0.145
125-
batch 10, loss 0.057
121+
>>> batch 2, loss 3.852
122+
batch 4, loss 1.126
123+
batch 6, loss 0.386
124+
batch 8, loss 0.145
125+
batch 10, loss 0.057
126126

127127

128128

@@ -133,11 +133,5 @@ conv2d.weight.data.reshape((1, 2))
133133

134134

135135

136-
tensor([[-1.0173, 0.9685]])
136+
>>> tensor([[-1.0173, 0.9685]])
137137

138-
139-
140-
141-
```python
142-
143-
```

0 commit comments

Comments
 (0)