Skip to content

Commit

Permalink
Fix typos in layer writing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed May 3, 2016
1 parent f576f37 commit fc470db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/templates/layers/writing-your-own-keras-layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Here is the skeleton of a Keras layer. There are only three methods you need to
```python
from keras import backend as K
from keras.engine.topology import Layer
import numpy as np

class MyLayer(Layer):
def __init__(self, output_dim, **kwargs):
Expand All @@ -27,7 +28,7 @@ class MyLayer(Layer):
return K.dot(x, self.W)

def get_output_shape_for(self, input_shape):
return (input_shape[0] + self.output_dim)
return (input_shape[0], self.output_dim)
```

The existing Keras layers provide ample examples of how to implement almost anything. Never hesitate to read the source code!

0 comments on commit fc470db

Please sign in to comment.