Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from keras import backend as K
  2.  
  3. inp = model.input # input placeholder
  4. outputs = [layer.output for layer in model.layers] # all layer outputs
  5. functor = K.function([inp, K.learning_phase()], outputs ) # evaluation function
  6.  
  7. # Testing
  8. test = x_test[0][np.newaxis,...]
  9. layer_outs = functor([test, 1.])
  10. #print layer_outs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement