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

ValueError: Inputs must be an iterable of at least one Tensor/IndexedSlices with the same dtype and shape. #3046

Open
neslihancakmak opened this issue Jul 12, 2024 · 0 comments

Comments

@neslihancakmak
Copy link

ValueError Traceback (most recent call last)
in <cell line: 8>()
6
7 # Eğitim fonksiyonunu çalıştırın
----> 8 model.train(dataset_train, dataset_val,
9 learning_rate=config.LEARNING_RATE , # lr yerine learning_rate kullanılıyor
10 epochs=2,

3 frames
/content/gdrive/MyDrive/maskrcnn/maskrcnn/mrcnn/model.py in train(self, train_dataset, val_dataset, learning_rate, epochs, layers, augmentation, custom_callbacks, no_augmentation_sources)
2359 ]
2360
-> 2361 # Add custom callbacks to the list
2362 if custom_callbacks:
2363 callbacks += custom_callbacks

/content/gdrive/MyDrive/maskrcnn/maskrcnn/mrcnn/model.py in compile(self, learning_rate, momentum)
2190 for w in self.keras_model.trainable_weights
2191 if 'gamma' not in w.name and 'beta' not in w.name]
-> 2192
2193
2194

/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/traceback_utils.py in error_handler(*args, **kwargs)
151 except Exception as e:
152 filtered_tb = _process_traceback_frames(e.traceback)
--> 153 raise e.with_traceback(filtered_tb) from None
154 finally:
155 del filtered_tb

/usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/math_ops.py in add_n(inputs, name)
4136 """
4137 if not inputs or not isinstance(inputs, collections_abc.Iterable):
-> 4138 raise ValueError("Inputs must be an iterable of at least one "
4139 "Tensor/IndexedSlices with the same dtype and shape.")
4140 inputs = indexed_slices.convert_n_to_tensor_or_indexed_slices(inputs)

ValueError: Inputs must be an iterable of at least one Tensor/IndexedSlices with the same dtype and shape.

what is the solution?
Thanks

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