Skip to content

Commit 228a5f6

Browse files
author
Johannes Ballé
committed
Merge pull request #153 from MahmoudAshraf97:master
PiperOrigin-RevId: 487567856 Change-Id: I82dc05d4229c561045f4160c4aefda334f212e91
2 parents 4e64806 + 956c727 commit 228a5f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

models/hific/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,15 @@ def __init__(self, weight_path):
846846
def wrap_frozen_graph(graph_def, inputs, outputs):
847847
def _imports_graph_def():
848848
tf.graph_util.import_graph_def(graph_def, name="")
849-
wrapped_import = tf.wrap_function(_imports_graph_def, [])
849+
850+
wrapped_import = tf.compat.v1.wrap_function(_imports_graph_def, [])
850851
import_graph = wrapped_import.graph
851852
return wrapped_import.prune(
852853
tf.nest.map_structure(import_graph.as_graph_element, inputs),
853854
tf.nest.map_structure(import_graph.as_graph_element, outputs))
854855

855856
# Pack LPIPS network into a tf function
856-
graph_def = tf.GraphDef()
857+
graph_def = tf.compat.v1.GraphDef()
857858
with open(weight_path, "rb") as f:
858859
graph_def.ParseFromString(f.read())
859860
self._lpips_func = tf.function(

0 commit comments

Comments
 (0)