Closed alvervalleysoftware closed 6 years ago
You can create multiple sessions with graphs. e.g.
g = tf.Graph()
with g.as_default():
sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))
...
This is how, for instance, we load the YOLO TF model for object detection prior to running the model in guess.py, so maybe see that code as a reference.
Thanks - I'll give that a try.
Hi,
Firstly, thanks for this - it's a really useful repo, and I can run either age or gender classifications successfully.
I need to run both on a given image - but I'm running into problems with multiple instances of the graph loaded. Whatever I do, I get problems around the 'model_fn()' line - when I call that again for a second time with a different number of labels, I get errors like "ValueError: Variable InceptionV3/Conv2d_1a_3x3/weights already exists, disallowed".
I realise that this is a more general question about how to have two Estimators loaded at once, but I need to do it in this specific case. Can anyone help?
Thanks in advance.