Error: "tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape of tensor EagerPyFunc [1024,1536,1] is not compatible with expected shape [?,?,3]. #1904
Replies: 1 comment
-
Hi @camilletestard! This is likely due to grayscale/RGB mismatch across the videos. I believe we'll have a fix for this in the next release but for now a quick fix is to set all videos to one out the other in the Videos panel (probably RGB in your case). Let us know if that works! Cheers, Talmo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am training a new model using SLEAP and have encountered the error below during the centroid model training. Do you have any idea what might be causing this error? Thanks!
INFO:sleap.nn.training:Creating tf.data.Datasets for training data generation...
Traceback (most recent call last):
File "C:\Users\camil\anaconda3\envs\sleap\Scripts\sleap-train-script.py", line 33, in
sys.exit(load_entry_point('sleap==1.3.3', 'console_scripts', 'sleap-train')())
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\sleap\nn\training.py", line 2014, in main
trainer.train()
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\sleap\nn\training.py", line 928, in train
training_ds = self.training_pipeline.make_dataset()
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\sleap\nn\data\pipelines.py", line 287, in make_dataset
ds = transformer.transform_dataset(ds)
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\sleap\nn\data\dataset_ops.py", line 318, in transform_dataset
self.examples = list(iter(ds))
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\tensorflow\python\data\ops\iterator_ops.py", line 800, in next
return self._next_internal()
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\tensorflow\python\data\ops\iterator_ops.py", line 786, in _next_internal
output_shapes=self._flat_output_shapes)
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\tensorflow\python\ops\gen_dataset_ops.py", line 2844, in iterator_get_next
_ops.raise_from_not_ok_status(e, name)
File "C:\Users\camil\anaconda3\envs\sleap\lib\site-packages\tensorflow\python\framework\ops.py", line 7107, in raise_from_not_ok_status
raise core._status_to_exception(e) from None # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape of tensor EagerPyFunc [1024,1536,1] is not compatible with expected shape [?,?,3].
[[{{node EnsureShape}}]] [Op:IteratorGetNext]
2024-08-13 15:57:15.360782: W tensorflow/core/kernels/data/cache_dataset_ops.cc:768] The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to
dataset.cache().take(k).repeat()
. You should usedataset.take(k).cache().repeat()
instead.INFO:sleap.nn.callbacks:Closing the reporter controller/context.
INFO:sleap.nn.callbacks:Closing the training controller socket/context.
Run Path: C:/Users/camil/Documents/Sleap/ReunionVideos_CentralArenaModel/SideCage_model_multivideo\models\240813_155703.centroid.n=315
Beta Was this translation helpful? Give feedback.
All reactions