diff --git a/docs/templates/getting-started/faq.md b/docs/templates/getting-started/faq.md index 102e26dab..0ec2f3d62 100644 --- a/docs/templates/getting-started/faq.md +++ b/docs/templates/getting-started/faq.md @@ -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?