Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov committed Nov 8, 2018
1 parent 06e4a45 commit cfd0f01
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<img src="http://arogozhnikov.github.io/images/einops/einops_logo_350x350.png"
alt="einops package logo" />
alt="einops package logo" width="250" height="250" />
<br><br>
</div>

Expand Down Expand Up @@ -73,8 +73,8 @@ from einops.layers.keras import Rearrange, Reduce
from einops.layers.torch import Rearrange, Reduce
```

Layers are behaving in the same way as operations and have same parameters
(for the exception of first argument, which should be passed during call)
Layers behave similarly to operations and have same parameters
(for the exception of first argument, which is passed during call)

```python
layer = Rearrange(pattern, **axes_lengths)
Expand All @@ -94,8 +94,9 @@ model = Sequential(
Conv2d(3, 6, kernel_size=5),
MaxPool2d(kernel_size=2),
Conv2d(6, 16, kernel_size=5),
# combined pooling and flattening
Reduce('b c (h h2) (w w2) -> b (c h w)', 'max', h2=2, w2=2),
MaxPool2d(kernel_size=2),
# flattening
Rearrange('b c h w -> b (c h w)'),
Linear(16*5*5, 120),
ReLU(),
Linear(120, 10),
Expand Down

0 comments on commit cfd0f01

Please sign in to comment.