_state = read_json("{}.state".format(basename))
if __version__ != _state["version"]:
logger.warning("Loaded model is from baseline version %s, running version is %s", _state["version"], __version__)
_state["sess"] = kwargs.pop("sess", tf.Session())
embeddings_info = _state.pop("embeddings")
with _state["sess"].graph.as_default():
After Change
_state = read_json("{}.state".format(basename))
if __version__ != _state["version"]:
logger.warning("Loaded model is from baseline version %s, running version is %s", _state["version"], __version__)
_state["sess"] = kwargs.pop("sess", create_session())
embeddings_info = _state.pop("embeddings")
with _state["sess"].graph.as_default():