Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
waqarmughal0002 opened this issue Aug 9, 2023 · 0 comments

Comments

@waqarmughal0002
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant