Skip to content

Commit

Permalink
Clarify use of two-branch models
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jun 14, 2016
1 parent 53aaa84 commit 6501b58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/templates/getting-started/sequential-model-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ final_model.add(Dense(10, activation='softmax'))

<img src="http://s3.amazonaws.com/keras.io/img/two_branches_sequential_model.png" alt="two branch Sequential" style="width: 400px;"/>

Such a two-branch model can then be trained via e.g.:

```python
final_model.compile(optimizer='rmsprop', loss='categorical_crossentropy')
final_model.fit([input_data_1, input_data_2], targets) # we pass on data array per model input
```

The `Merge` layer supports a number of pre-defined modes:

- `sum` (default): element-wise sum
Expand Down

0 comments on commit 6501b58

Please sign in to comment.