Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How can I get the output of each layer in Tensorflow 2

from tensorflow.python.keras import backend as K

model = build_model() 
# lstm_67 is the second layer.
lstm = K.function([model.layers[0].input], [model.layers[1].output])
lstm_output = lstm([test_x])[0]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #output #layer #Tensorflow
ADD COMMENT
Topic
Name
7+6 =