---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in _call_cpp_shape_fn_impl(op, input_tensors_needed, input_tensors_as_shapes_needed, debug_python_shape_fn, require_shape_fn)
670 graph_def_version, node_def_str, input_shapes, input_tensors,
--> 671 input_tensors_as_shapes, status)
672 except errors.InvalidArgumentError as err:
/usr/lib/python3.5/contextlib.py in __exit__(self, type, value, traceback)
65 try:
---> 66 next(self.gen)
67 except StopIteration:
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py in raise_exception_on_not_ok_status()
465 compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 466 pywrap_tensorflow.TF_GetCode(status))
467 finally:
InvalidArgumentError: Dimensions must be equal, but are 8744670 and 258203 for 'map/while/UnsortedSegmentSum' (op: 'UnsortedSegmentSum') with input shapes: [8744670], [258203], [].
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-3-000ea5119b50> in <module>()
86 start = time.time()
87
---> 88 hough = frequencyHough(frequenzeTF, tempiTF, spindownsTF,pesiTF,nRows,nColumns)
89
90 image = sessione.run(hough)
<ipython-input-3-000ea5119b50> in frequencyHough(nu, t, nuDot, w, numRows, numColumns)
75
76 houghLeft = tf.map_fn(rowTransform, tf.range(0, numRows),
---> 77 dtype=tf.float32, parallel_iterations=10)
78 houghRight = houghLeft[:,enhancement:numColumns]-houghLeft[:,0:numColumns - enhancement]
79 houghDiff = tf.concat([houghLeft[:,0:enhancement],houghRight],1)
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/functional_ops.py in map_fn(fn, elems, dtype, parallel_iterations, back_prop, swap_memory, infer_shape, name)
387 parallel_iterations=parallel_iterations,
388 back_prop=back_prop,
--> 389 swap_memory=swap_memory)
390 results_flat = [r.stack() for r in r_a]
391
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py in while_loop(cond, body, loop_vars, shape_invariants, parallel_iterations, back_prop, swap_memory, name)
2768 context = WhileContext(parallel_iterations, back_prop, swap_memory, name)
2769 ops.add_to_collection(ops.GraphKeys.WHILE_CONTEXT, context)
-> 2770 result = context.BuildLoop(cond, body, loop_vars, shape_invariants)
2771 return result
2772
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py in BuildLoop(self, pred, body, loop_vars, shape_invariants)
2597 self.Enter()
2598 original_body_result, exit_vars = self._BuildLoop(
-> 2599 pred, body, original_loop_vars, loop_vars, shape_invariants)
2600 finally:
2601 self.Exit()
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py in _BuildLoop(self, pred, body, original_loop_vars, loop_vars, shape_invariants)
2547 structure=original_loop_vars,
2548 flat_sequence=vars_for_body_with_tensor_arrays)
-> 2549 body_result = body(*packed_vars_for_body)
2550 if not nest.is_sequence(body_result):
2551 body_result = [body_result]
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/functional_ops.py in compute(i, tas)
377 """
378 packed_values = input_pack([elem_ta.read(i) for elem_ta in elems_ta])
--> 379 packed_fn_values = fn(packed_values)
380 nest.assert_same_structure(dtype or elems, packed_fn_values)
381 flat_fn_values = output_flatten(packed_fn_values)
<ipython-input-3-000ea5119b50> in rowTransform(ithSD)
70 transform = tf.round(nu-sdTimed+securbeltTF/2)
71 transform = tf.cast(transform, dtype=tf.int32)
---> 72 values = tf.unsorted_segment_sum(w, transform, numColumns)
73 #values = tf.cast(values, dtype=tf.float32)
74 return values
~/.local/lib/python3.5/site-packages/tensorflow/python/ops/gen_math_ops.py in unsorted_segment_sum(data, segment_ids, num_segments, name)
2701 result = _op_def_lib.apply_op("UnsortedSegmentSum", data=data,
2702 segment_ids=segment_ids,
-> 2703 num_segments=num_segments, name=name)
2704 return result
2705
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py in apply_op(self, op_type_name, name, **keywords)
765 op = g.create_op(op_type_name, inputs, output_types, name=scope,
766 input_types=input_types, attrs=attr_protos,
--> 767 op_def=op_def)
768 if output_structure:
769 outputs = op.outputs
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in create_op(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_shapes, compute_device)
2506 original_op=self._default_original_op, op_def=op_def)
2507 if compute_shapes:
-> 2508 set_shapes_for_outputs(ret)
2509 self._add_op(ret)
2510 self._record_op_seen_by_control_dependencies(ret)
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in set_shapes_for_outputs(op)
1871 shape_func = _call_cpp_shape_fn_and_require_op
1872
-> 1873 shapes = shape_func(op)
1874 if shapes is None:
1875 raise RuntimeError(
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py in call_with_requiring(op)
1821
1822 def call_with_requiring(op):
-> 1823 return call_cpp_shape_fn(op, require_shape_fn=True)
1824
1825 _call_cpp_shape_fn_and_require_op = call_with_requiring
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in call_cpp_shape_fn(op, input_tensors_needed, input_tensors_as_shapes_needed, debug_python_shape_fn, require_shape_fn)
608 res = _call_cpp_shape_fn_impl(op, input_tensors_needed,
609 input_tensors_as_shapes_needed,
--> 610 debug_python_shape_fn, require_shape_fn)
611 if not isinstance(res, dict):
612 # Handles the case where _call_cpp_shape_fn_impl calls unknown_shape(op).
~/.local/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py in _call_cpp_shape_fn_impl(op, input_tensors_needed, input_tensors_as_shapes_needed, debug_python_shape_fn, require_shape_fn)
674 missing_shape_fn = True
675 else:
--> 676 raise ValueError(err.message)
677
678 if missing_shape_fn:
ValueError: Dimensions must be equal, but are 8744670 and 258203 for 'map/while/UnsortedSegmentSum' (op: 'UnsortedSegmentSum') with input shapes: [8744670], [258203], [].