tensorflow / tensorflow/graphics
TypeError: Input 'shape' of 'ScatterNd' Op has type int64 that does not match type int32 of argument 'indices'.
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 374
- PR merge metrics
- No merged PRs in 30d
Description
Trying to test Local Implicit sample I've found this issue:
Performing latent grid optimization...
Traceback (most recent call last):
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 508, in _apply_op_helper
values = ops.convert_to_tensor(
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\tensorflow\python\profiler\trace.py", line 183, in wrapped
return func(*args, **kwargs)
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\tensorflow\python\framework\ops.py", line 1662, in convert_to_tensor
raise ValueError(
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor 'Const_3:0' shape=(2,) dtype=int64>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Dependencias\LocalImplicitGrid\graphics\reconstruct_geometry.py", line 108, in <module>
app.run(main)
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\absl\app.py", line 312, in run
_run_main(main, args)
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\absl\app.py", line 258, in _run_main
sys.exit(main(argv))
File "D:\Dependencias\LocalImplicitGrid\graphics\reconstruct_geometry.py", line 88, in main
v, f, _, _ = rec.encode_decoder_one_scene(
File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\reconstruction.py", line 351, in encode_decoder_one_scene
goptim = LIGOptimizer(
File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\reconstruction.py", line 61, in __init__
self._init_graph()
File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\reconstruction.py", line 106, in _init_graph
self.feat_grid = tf.scatter_nd(self.occ_idx_flat_,
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 9185, in scatter_nd
_, _, _op, _outputs = _op_def_library._apply_op_helper(
File "C:\Users\Victor\anaconda3\envs\LocalImplicit\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 546, in _apply_op_helper
raise TypeError(
TypeError: Input 'shape' of 'ScatterNd' Op has type int64 that does not match type int32 of argument 'indices'.
Any tip on this?
Thank you in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with graphics/reconstruct_geometry.py and follow the Local Implicit sample into core/reconstruction.py, especially LIGOptimizer._init_graph at line 106 where tf.scatter_nd fails. Reproduce the sample's latent grid optimization and inspect the dtypes of the indices and shape inputs. Done means reconstruction proceeds past this ScatterNd error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100