joshi-bharat / deep_underwater_localization

Source Code for "DeepURL: Deep Pose Estimation Framework for Underwater Relative Localization", IROS 2020
GNU General Public License v3.0
24 stars 11 forks source link

Cannot convert a symbolic Tensor (meshgrid/Size_1:0) to a numpy array. #14

Open waqarmughal0002 opened 1 year ago

waqarmughal0002 commented 1 year ago

The python version is 3.7.5 and tensorflow version is 1.15.0. While running test_single_imapy.py file i got this error. I am unable to solve that error. waiting for your kind reponse.

Traceback (most recent call last): File "test_single_image.py", line 82, in pred_boxes, pred_confs, pred_probs = yolo_model.predict(yolo_features) File "/home/waqar/deepurl3.7/deep_underwater_localization-master/model.py", line 179, in predict reorg_results = [self.reorg_layer(feature_map, anchors) for (feature_map, anchors) in feature_map_anchors] File "/home/waqar/deepurl3.7/deep_underwater_localization-master/model.py", line 179, in reorg_results = [self.reorg_layer(feature_map, anchors) for (feature_map, anchors) in feature_map_anchors] File "/home/waqar/deepurl3.7/deep_underwater_localization-master/model.py", line 139, in reorg_layer grid_x, grid_y = tf.meshgrid(grid_x, grid_y) File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2943, in meshgrid mult_fact = ones(shapes, output_dtype) File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2560, in ones output = _constant_if_small(one, shape, dtype, name) File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2295, in _constant_if_small if np.prod(shape) < 1000: File "<__array_function__ internals>", line 6, in prod File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 3052, in prod keepdims=keepdims, initial=initial, where=where) File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) File "/home/waqar/deepurl3.7/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 736, in array " array.".format(self.name)) NotImplementedError: Cannot convert a symbolic Tensor (meshgrid/Size_1:0) to a numpy array.