Skip to content

Instantly share code, notes, and snippets.

@iamsurya
Created May 31, 2019 19:44
Show Gist options
  • Save iamsurya/a0312e816162f861342b6a3ada8d7acb to your computer and use it in GitHub Desktop.
Save iamsurya/a0312e816162f861342b6a3ada8d7acb to your computer and use it in GitHub Desktop.
from keras import backend as K
import tensorflow as tf
frozen_graph = freeze_session(K.get_session(),
output_names=[out.op.name for out in model.outputs])
tf.train.write_graph(frozen_graph, "slopemodel", "slopemodel.pb", as_text=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment