Closed YIFanH closed 2 years ago
The eval code should be stand-alone. Can you show me your error messages? I've tried tf 2.8. If it's urgent, you can add me WeChat: arthurchen518.
thanks and I add you
@YIFanH Hi, were you able to run the eval.py script? If yes, could you please share the TensorFlow version that you used, also any errors that you encountered.
I am currently stuck at this error below:
Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: _run_module_as_main) Input 'records' of 'DecodeCSV' Op has type float32 that does not match expected type of string. File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 427, in converted_call converted_f = _convert_actual(target_entity, program_ctx) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 269, in _convert_actual transformed, module, source_map = _TRANSPILER.transform(entity, program_ctx) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 282, in transform return self.transform_function(obj, user_context) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 466, in transform_function nodes, ctx = super(PyToPy, self).transform_function(fn, user_context) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 359, in transform_function result = self.transform_ast(node, context) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 237, in transform_ast node = self.initial_analysis(node, ctx) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 225, in initial_analysis node = activity.resolve(node, ctx, None) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/static_analysis/activity.py", line 704, in resolve return ActivityAnalyzer(context, parent_scope).visit(node) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/transformer.py", line 441, in visit result = super(Base, self).visit(node) File "/usr/lib/python3.7/ast.py", line 271, in visit return visitor(node) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/static_analysis/activity.py", line 574, in visit_FunctionDef node = self._visit_arg_annotations(node) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/static_analysis/activity.py", line 550, in _visit_arg_annotations node = self._visit_arg_declarations(node) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/pyct/static_analysis/activity.py", line 555, in _visit_arg_declarations node.args.posonlyargs = self._visit_node_list(node.args.posonlyargs)
During handling of the above exception, another exception occurred:
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 557, in _ExtractInputsAndAttrs preferred_dtype=default_dtype) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/profiler/trace.py", line 183, in wrapped return func(*args, **kwargs) File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1605, in convert_to_tensor name=name))
During handling of the above exception, another exception occurred:
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 579, in _ExtractInputsAndAttrs
raise TypeError(f"{prefix} expected type of "
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/media/vispro/New_Volume/Basit/WB/DirectionNet/dataset_loader.py", line 78, in load_images
tf.stack([tf.decode_csv(rotation, [0.0] 9)], 0), [3, 3])
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 458, in _call_unconverted
return f(args, kwargs)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 484, in _fall_back_unconverted
return _call_unconverted(f, args, kwargs, options)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 434, in converted_call
return _fall_back_unconverted(f, args, kwargs, options, e)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py", line 689, in wrapper
return converted_call(f, args, kwargs, options=options)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/data/ops/structured_function.py", line 177, in wrapper_helper
ret = autograph.tf_convert(self._func, ag_ctx)(nested_args)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/data/ops/structured_function.py", line 248, in wrapped_fn
ret = wrapper_helper(args)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/framework/func_graph.py", line 1141, in func_graph_from_py_func
func_outputs = python_func(*func_args, *func_kwargs)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2636, in _create_graph_function
capture_by_value=self._capture_by_value),
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2711, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2533, in _get_concrete_function_garbage_collected
graphfunction, = self._maybe_define_function(args, kwargs)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2568, in get_concrete_function
args, kwargs)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/data/ops/structured_function.py", line 271, in init
self._function = fn_factory()
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 5288, in init
use_legacy_function=use_legacy_function)
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 3870, in map
preserve_cardinality=False))
File "/media/vispro/New_Volume/Basit/WB/DirectionNet/dataset_loader.py", line 96, in data_loader
ds = ds.map(load_images, num_parallel_calls=50).apply(
File "/media/vispro/New_Volume/Basit/WB/DirectionNet/eval.py", line 313, in main
load_estimated_rot=FLAGS.model == 'T')
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/media/vispro/New_Volume/Basit/environments/wb_new/lib/python3.7/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/media/vispro/New_Volume/Basit/WB/DirectionNet/eval.py", line 351, in
@basit-7 Hi basit, I have the same problem. Did you figure it out?
File "/home/user/MyComputer/DirectionNet/dataset_loader.py", line 81, in load_images * rotation = tf.reshape(
TypeError: Input 'records' of 'DecodeCSV' Op has type float32 that does not match expected type of string.
@CBS5181 I have the same problem, did you solve it?
HI , @arthurchen0518 dose eval have to execute the process code with training process, the provided eval did not run successfully,my tf version is 2.8, and i update evaluation.evaluate_repeatedly to evaluation.evaluate_once is not work. i'm looking forward to your reply,thanks very much