Open zyx-0314 opened 2 years ago
InvalidArgumentError Traceback (most recent call last) d:\Codes\TensorFlow\TFODCourse\2. Training and Detection.ipynb Cell 52' in <cell line: 5>() 2 image_np = np.array(img) 4 input_tensor = tf.convert_to_tensor(np.expand_dims(image_np, 0), dtype=tf.float32) ----> 5 detections = detect_fn(input_tensor) 7 num_detections = int(detections.pop('num_detections')) 8 detections = {key: value[0, :num_detections].numpy() 9 for key, value in detections.items()}
File d:\Codes\TensorFlow\TFODCourse\tfod\lib\site-packages\tensorflow\python\util\traceback_utils.py:153, in filter_traceback..error_handler(*args, **kwargs) 151 except Exception as e: 152 filtered_tb = _process_traceback_frames(e.traceback) --> 153 raise e.with_traceback(filtered_tb) from None 154 finally: 155 del filtered_tb
File d:\Codes\TensorFlow\TFODCourse\tfod\lib\site-packages\tensorflow\python\eager\execute.py:54, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 52 try: 53 ctx.ensure_initialized() ---> 54 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, 55 inputs, attrs, num_outputs) 56 except core._NotOkStatusException as e: 57 if name is not None:
InvalidArgumentError: Graph execution error:
just restart your kernel
After IMAGE_PATH, the next to code of lines display this error.
InvalidArgumentError Traceback (most recent call last) d:\Codes\TensorFlow\TFODCourse\2. Training and Detection.ipynb Cell 52' in <cell line: 5>() 2 image_np = np.array(img) 4 input_tensor = tf.convert_to_tensor(np.expand_dims(image_np, 0), dtype=tf.float32) ----> 5 detections = detect_fn(input_tensor) 7 num_detections = int(detections.pop('num_detections')) 8 detections = {key: value[0, :num_detections].numpy() 9 for key, value in detections.items()}
File d:\Codes\TensorFlow\TFODCourse\tfod\lib\site-packages\tensorflow\python\util\traceback_utils.py:153, in filter_traceback..error_handler(*args, **kwargs)
151 except Exception as e:
152 filtered_tb = _process_traceback_frames(e.traceback)
--> 153 raise e.with_traceback(filtered_tb) from None
154 finally:
155 del filtered_tb
File d:\Codes\TensorFlow\TFODCourse\tfod\lib\site-packages\tensorflow\python\eager\execute.py:54, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 52 try: 53 ctx.ensure_initialized() ---> 54 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, 55 inputs, attrs, num_outputs) 56 except core._NotOkStatusException as e: 57 if name is not None:
InvalidArgumentError: Graph execution error: