// TODO: Crash if cudnn is loaded
// Workaround create new graph and load weights
print(e)
print("Attempting a workaround")
model = TensorflowModel.from_proto(network_proto)
with model.graph.as_default() as g:
saver = tf.train.Saver()
After Change
saver.restore(model.session, restore)
except tf.errors.NotFoundError as e:
print("Attempting workaround: only loading trainable variables")
saver = tf.train.Saver(tf.trainable_variables())
saver.restore(model.session, restore)
return model