corrected parameter for learning_phase (#2284)

This commit is contained in:
Kyle McDonald 2016-04-12 13:18:42 -04:00 committed by François Chollet
parent d50f469c09
commit 66ebd2a843

@ -134,13 +134,15 @@ to pass the learning phase flag to your function:
get_3rd_layer_output = K.function([model.layers[0].input, K.learning_phase()],
[model.layers[3].output])
# output in train mode
layer_output = get_3rd_layer_output([X, 1])[0]
# output in train mode = 0
layer_output = get_3rd_layer_output([X, 0])[0]
# output in test mode
# output in test mode = 1
layer_output = get_3rd_layer_output([X, 1])[0]
```
Another more flexible way of getting output from intermediate layers is to use the [functional API](/getting-started/functional-api-guide).
---
### How can I use Keras with datasets that don't fit in memory?