Functions | Variables
save_tf_proto Namespace Reference

Functions

def load_model (name)
 

Variables

 parser = argparse.ArgumentParser(description='Save model to TF protobuf')
 
 help
 
 default
 
 args = parser.parse_args()
 
 m = load_model(args.model)
 
list nnames = [n.name for n in K.get_session().graph.as_graph_def().node]
 
 lastnode = None
 
string currentname = ''
 
list output_nodes = []
 
 basename = n[:n.find('/')]
 
 minimal_graph = convert_variables_to_constants(K.get_session(), K.get_session().graph.as_graph_def(), output_nodes)
 
 as_text
 

Function Documentation

def save_tf_proto.load_model (   name)

Definition at line 19 of file save_tf_proto.py.

19 def load_model(name):
20  with open(name + '_architecture.json') as f:
21  model = model_from_json(f.read())
22  model.load_weights(name + '_weights.h5')
23  return model
24 
25 K.set_learning_phase(0)
int open(const char *, int)
Opens a file descriptor.
def load_model(name)

Variable Documentation

save_tf_proto.args = parser.parse_args()

Definition at line 7 of file save_tf_proto.py.

save_tf_proto.as_text

Definition at line 55 of file save_tf_proto.py.

save_tf_proto.basename = n[:n.find('/')]

Definition at line 34 of file save_tf_proto.py.

save_tf_proto.currentname = ''

Definition at line 31 of file save_tf_proto.py.

save_tf_proto.default

Definition at line 3 of file save_tf_proto.py.

save_tf_proto.help

Definition at line 3 of file save_tf_proto.py.

save_tf_proto.lastnode = None

Definition at line 30 of file save_tf_proto.py.

save_tf_proto.m = load_model(args.model)

Definition at line 26 of file save_tf_proto.py.

save_tf_proto.minimal_graph = convert_variables_to_constants(K.get_session(), K.get_session().graph.as_graph_def(), output_nodes)

Definition at line 50 of file save_tf_proto.py.

list save_tf_proto.nnames = [n.name for n in K.get_session().graph.as_graph_def().node]

Definition at line 28 of file save_tf_proto.py.

list save_tf_proto.output_nodes = []

Definition at line 32 of file save_tf_proto.py.

save_tf_proto.parser = argparse.ArgumentParser(description='Save model to TF protobuf')

Definition at line 2 of file save_tf_proto.py.