-
Notifications
You must be signed in to change notification settings - Fork 41
Description
TypeError Traceback (most recent call last)
in
1 ### change the location accordingly
----> 2 detection_model = tf.saved_model.load('object_detection\inference_graph\saved_model')
3
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\load.py in load(export_dir, tags, options)
857 ValueError: If tags
don't match a MetaGraph in the SavedModel.
858 """
--> 859 return load_internal(export_dir, tags, options)["root"]
860
861
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\load.py in load_internal(export_dir, tags, options, loader_cls, filters)
887 with ops.init_scope():
888 try:
--> 889 loader = loader_cls(object_graph_proto, saved_model_proto, export_dir,
890 ckpt_options, filters)
891 except errors.NotFoundError as err:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\load.py in init(self, object_graph_proto, saved_model_proto, export_dir, ckpt_options, filters)
129 self._export_dir = export_dir
130 self._concrete_functions = (
--> 131 function_deserialization.load_function_def_library(
132 meta_graph.graph_def.library))
133 self._checkpoint_options = ckpt_options
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\function_deserialization.py in load_function_def_library(library, load_shared_name_suffix)
330 load_shared_name_suffix = "load{}".format(ops.uid())
331 for fdef in _sort_function_defs(library, library_function_names):
--> 332 copy = _fix_fdef(fdef, functions, load_shared_name_suffix)
333
334 # There is no need to copy all functions into the function def graph. It
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\function_deserialization.py in _fix_fdef(orig_fdef, functions, shared_name_suffix)
473 fdef.CopyFrom(orig_fdef)
474 for node_def in fdef.node_def:
--> 475 fix_node_def(node_def, functions, shared_name_suffix, fdef.signature.name)
476
477 fdef.signature.name = _clean_function_name(fdef.signature.name)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\saved_model\function_deserialization.py in fix_node_def(node_def, functions, shared_name_suffix, debug_name)
412 if ("_gradient_op_type" in node_def.attr and
413 node_def.op not in ["StatefulPartitionedCall", "PartitionedCall"]):
--> 414 logging.warning(
415 "Importing a function (%s) with ops with custom gradients. Will likely "
416 "fail if a gradient is requested.", debug_name)
C:\ProgramData\Anaconda3\lib\site-packages\absl\logging_init_.py in warning(msg, *args, **kwargs)
320 def warning(msg, *args, **kwargs):
321 """Logs a warning message."""
--> 322 log(WARNING, msg, *args, **kwargs)
323
324
C:\ProgramData\Anaconda3\lib\site-packages\absl\logging_init_.py in log(level, msg, *args, **kwargs)
483 logging.basicConfig()
484
--> 485 _absl_logger.log(standard_level, msg, *args, **kwargs)
486
487
C:\ProgramData\Anaconda3\lib\site-packages\absl\logging_init_.py in log(self, level, msg, *args, **kwargs)
1045 extra = kwargs.setdefault('extra', {})
1046 extra[_ABSL_LOG_FATAL] = True
-> 1047 super(ABSLLogger, self).log(level, msg, *args, **kwargs)
1048
1049 def handle(self, record):
C:\ProgramData\Anaconda3\lib\logging_init_.py in log(self, level, msg, *args, **kwargs)
1498 return
1499 if self.isEnabledFor(level):
-> 1500 self._log(level, msg, args, **kwargs)
1501
1502 def findCaller(self, stack_info=False, stacklevel=1):
C:\ProgramData\Anaconda3\lib\logging_init_.py in _log(self, level, msg, args, exc_info, extra, stack_info, stacklevel)
1563 #IronPython can use logging.
1564 try:
-> 1565 fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
1566 except ValueError: # pragma: no cover
1567 fn, lno, func = "(unknown file)", 0, "(unknown function)"
TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given