You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why tf.data.Dataset.choose_from_datasets() chooses only one element from dataset of size-element 5, I want to unite with other dataset of size-element 5 the same. If I want to merge dataset with all their elements and get <ChooseDataset ...> with 10 elements inside
#67327
Open
Hell576 opened this issue
May 10, 2024
· 3 comments
@Hell576 tf.data.Dataset.choose_from_datasets() isn't designed to merge datasets element-wise. It actually picks elements one at a time, deterministically choosing from the provided datasets based on a separate "choice" dataset.
Thank you!
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
tf v2.16.0-rc0-18-g5bc9d26649c 2.16.1
Custom code
Yes
OS platform and distribution
Windows 10 Home
Mobile device
No response
Python version
3.11.8
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
Ryzen 5 5600U 8 gb RAM
Current behavior?
I expect to have one dataset with 21 elements from SUB_DATASETS trainSubDs***(unpack it):
Uploading SUB_DATASETS.7z… link if archive didn't upload: https://drive.google.com/drive/folders/1yg2QL6uXUwNikSVNduBl0tMvOSqTa050?usp=sharing
It looks like(console could show only last elements to output, it could copy only last snippet):
[[0.5359075],
[0.2795821],
[0.0720736],
...,
[0.0077176],
[0.1932825],
[0.0856282]],
train_ds el 12 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5237354],
[0.2701872],
[0.0703329],
...,
[0.008211 ],
[0.196203 ],
[0.088349 ]],
train_ds el 13 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5219159],
[0.2691515],
[0.0700537],
...,
[0.0110053],
[0.2001242],
[0.0888058]],
train_ds el 14 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5171451],
[0.2742897],
[0.0721269],
...,
[0.0055069],
[0.2053241],
[0.0913286]],
train_ds el 15 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5192521],
[0.277901 ],
[0.0729991],
...,
[0.0039281],
[0.2143918],
[0.0939896]],
train_ds el 16 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5331477],
[0.2739582],
[0.0717712],
...,
[0.0109573],
[0.1940901],
[0.0880007]],
train_ds el 17 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.526029 ],
[0.2695351],
[0.0711689],
...,
[0.0050149],
[0.2037496],
[0.0924048]],
train_ds el 18 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5228637],
[0.2701937],
[0.0715879],
...,
[0.0051579],
[0.2034421],
[0.0902776]],
train_ds el 19 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5154157],
[0.2765533],
[0.0723962],
...,
[0.0059454],
[0.2126359],
[0.0933117]],
train_ds el 20 : (<tf.Tensor: shape=(150, 128, 1), dtype=float64, numpy=
array([[[0.5253529],
[0.2798946],
[0.0724061],
...,
[0.0083182],
[0.2105255],
[0.0941397]],
Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: