Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PetraVidnerova authored Jun 12, 2019
1 parent 6eee386 commit 6f153e0
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,32 @@ RBF layer for Keras
You need rbflayer.py to use RBF layers in keras. See test.py for
very simple example.


Feel free to use or modify the code.

## Usage:

```
# creating RBF network
rbflayer = RBFLayer(10,
initializer=InitCentersRandom(X),
betas=2.0,
input_shape=(num_inputs,))
model = Sequential()
model.add(rbflayer)
model.add(Dense(n_outputs))
```

or using KMeans clustering for RBF centers

```
# creating RBFLayer with centers found by KMeans clustering
rbflayer = RBFLayer(10,
initializer=InitCentersKMeans(X),
betas=2.0,
input_shape=(num_inputs,))
```



Hint how to implement different radii for different dimensions: [#1](https://github.com/PetraVidnerova/rbf_keras/issues/1)

0 comments on commit 6f153e0

Please sign in to comment.