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

TypeError: Input 'shape' of 'ScatterNd' Op has type int64 that does not match type int32 of argument 'indices'. #684

Open
MotivaCG opened this issue Mar 3, 2022 · 1 comment

Comments

@MotivaCG
Copy link

MotivaCG commented Mar 3, 2022

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.

@MotivaCG
Copy link
Author

MotivaCG commented Mar 3, 2022

It seems to be related to not finding Cuda but after forcing it I have this new issue:



(localimplicit) D:\Dependencias\LocalImplicitGrid\graphics>python reconstruct_geometry.py --input_ply demo_data/living_room_33_1000_per_m2.ply --part_size=0.25
2022-03-03 20:11:52.947232: E tensorflow/core/lib/monitoring/collection_registry.cc:77] Cannot register 2 metrics with the same name: /tensorflow/api/keras/optimizers
Traceback (most recent call last):
  File "D:\Dependencias\LocalImplicitGrid\graphics\reconstruct_geometry.py", line 28, in <module>
    from tensorflow_graphics.projects.local_implicit_grid.core import reconstruction as rec
  File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\reconstruction.py", line 23, in <module>
    from tensorflow_graphics.projects.local_implicit_grid.core import evaluator
  File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\evaluator.py", line 27, in <module>
    from tensorflow_graphics.projects.local_implicit_grid.core import implicit_nets as im
  File "D:\Dependencias\LocalImplicitGrid\graphics\tensorflow_graphics\projects\local_implicit_grid\core\implicit_nets.py", line 24, in <module>
    layers = tf.keras.layers
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 62, in __getattr__
    module = self._load()
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 45, in _load
    module = importlib.import_module(self.__name__)
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\__init__.py", line 25, in <module>
    from keras import models
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\models.py", line 20, in <module>
    from keras import metrics as metrics_module
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\metrics.py", line 24, in <module>
    from keras import activations
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\activations.py", line 20, in <module>
    from keras.layers import advanced_activations
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\layers\__init__.py", line 23, in <module>
    from keras.engine.input_layer import Input
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\engine\input_layer.py", line 21, in <module>
    from keras.engine import base_layer
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\engine\base_layer.py", line 43, in <module>
    from keras.mixed_precision import loss_scale_optimizer
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\mixed_precision\loss_scale_optimizer.py", line 18, in <module>
    from keras import optimizers
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\optimizers.py", line 31, in <module>
    from keras.optimizer_v2 import adadelta as adadelta_v2
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\optimizer_v2\adadelta.py", line 22, in <module>
    from keras.optimizer_v2 import optimizer_v2
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\keras\optimizer_v2\optimizer_v2.py", line 36, in <module>
    keras_optimizers_gauge = tf.__internal__.monitoring.BoolGauge(
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\tensorflow\python\eager\monitoring.py", line 360, in __init__
    super(BoolGauge, self).__init__('BoolGauge', _bool_gauge_methods,
  File "C:\Users\Victor\anaconda3\envs\localimplicit\lib\site-packages\tensorflow\python\eager\monitoring.py", line 135, in __init__
    self._metric = self._metric_methods[self._label_length].create(*args)
tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.

(localimplicit) D:\Dependencias\LocalImplicitGrid\graphics>

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