I have a model to detect upto 10 digits, and I am using the same architecture of graph to detect 4 alphabets. It means first model have 10 classes and second model have 4 classes. Unfortunately, I have used the same variable names while training. Now I am trying to make a code to use both the models to detect digits as well as alphabets as given in code.
graph_1 = tf.Graph()
with graph_1.as_default() as g_1:
...graph_1 content.....
graph_2 = tf.Graph()
with graph_2.as_default() as g_2:
...graph_2 content.....
sess_1 = tf.InteractiveSession(graph = g_1)
sess_1.as_default()
....restoring model....
sess_2 = tf.InteractiveSession(graph = g_2)
sess_2.as_default()
....restoring model....
.
.
.
sess_1.run(prob, feed_dict)
sess_2.run(prob, feed_dict)
But now, I know this is not the correct way to approach. If someone knows, plz help me to arrange this code or share some helpful link. Thanks in advance.