Created
September 30, 2019 07:38
-
-
Save visionNoob/f2596e2d907af4462712c66b232f8ded to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras import backend as K | |
inp = model.input # input placeholder | |
outputs = [layer.output for layer in model.layers] # all layer outputs | |
functor = K.function([inp, K.learning_phase()], outputs ) # evaluation function | |
# Testing | |
test = x_test[0][np.newaxis,...] | |
layer_outs = functor([test, 1.]) | |
#print layer_outs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment