Traceback (most recent call last):


 "model_main_tf2.py", line 106, in <module>

tf.compat.v1.app.run()


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run

_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/absl/app.py", line 299, in run

_run_main(main, args)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main

sys.exit(main(argv))


 "model_main_tf2.py", line 83, in main

wait_interval=300, timeout=FLAGS.eval_timeout)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/object_detection/model_lib_v2.py", line 959, in eval_continuously

global_step=global_step)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/object_detection/model_lib_v2.py", line 774, in eager_eval_loop

eval_dict, losses_dict, class_agnostic = compute_eval_dict(features, labels)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 580, in __call__

result = self._call(*args, **kwds)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 627, in _call

self._initialize(args, kwds, add_initializers_to=initializers)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 506, in _initialize

*args, **kwds))


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2446, in _get_concrete_function_internal_garbage_collected

graph_function, _, _ = self._maybe_define_function(args, kwargs)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2777, in _maybe_define_function

graph_function = self._create_graph_function(args, kwargs)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2667, in _create_graph_function

capture_by_value=self._capture_by_value),


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 981, in func_graph_from_py_func

func_outputs = python_func(*func_args, **func_kwargs)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 441, in wrapped_fn

return weak_wrapped_fn().__wrapped__(*args, **kwds)


 "/Users/meg/opt/anaconda3/envs/SSD/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 968, in wrapper

raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:

Traceback (most recent call last):


 "crossEncoder.py", line 77, in <module>

output_path=model_save_path2)


 "/usr/local/lib/python3.6/dist-packages/sentence_transformers/cross_encoder/CrossEncoder.py", line 202, in fit

self._eval_during_training(evaluator, output_path, save_best_model, epoch, training_steps, callback)


 "/usr/local/lib/python3.6/dist-packages/sentence_transformers/cross_encoder/CrossEncoder.py", line 280, in _eval_during_training

score = evaluator(self, output_path=output_path, epoch=epoch, steps=steps)


 "/usr/local/lib/python3.6/dist-packages/sentence_transformers/cross_encoder/evaluation/CEBinaryClassificationEvaluator.py", line 50, in __call__

acc, acc_threshold = BinaryClassificationEvaluator.find_best_acc_and_threshold(pred_scores, self.labels, True)


 "/usr/local/lib/python3.6/dist-packages/sentence_transformers/evaluation/BinaryClassificationEvaluator.py", line 127, in find_best_acc_and_threshold

rows = sorted(rows, key=lambda x: x[0], reverse=high_score_more_similar)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
