File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -846,14 +846,15 @@ def __init__(self, weight_path):
846
846
def wrap_frozen_graph (graph_def , inputs , outputs ):
847
847
def _imports_graph_def ():
848
848
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 , [])
850
851
import_graph = wrapped_import .graph
851
852
return wrapped_import .prune (
852
853
tf .nest .map_structure (import_graph .as_graph_element , inputs ),
853
854
tf .nest .map_structure (import_graph .as_graph_element , outputs ))
854
855
855
856
# Pack LPIPS network into a tf function
856
- graph_def = tf .GraphDef ()
857
+ graph_def = tf .compat . v1 . GraphDef ()
857
858
with open (weight_path , "rb" ) as f :
858
859
graph_def .ParseFromString (f .read ())
859
860
self ._lpips_func = tf .function (
You can’t perform that action at this time.
0 commit comments