Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement