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):
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 (
You can’t perform that action at this time.
0 commit comments