Dataset related basic doubt

Hi all!
I’ve to implement cnn on a multi-dimensional signal data whose shape is somehow similar to that of a colorful image, as in each of my data points has a dimension of [65 * 1 * 1100] (analogy with a colored image is that instead of 3 layers of colors i have 65 layers, and for (length * width) of an image i have (1*1100). These data are currently in python list form because from raw csv file i first extract & convert them to python list.
I just wanted to know, how exactly can they be converted from list to a form which will be suitable for tensorflow, and all the train/test split type tasks may be done easily?

I know this seems to be a silly problem but I’m relatively new to tf and i really don’t know what to do here. Any help is really appreciated!

hello, you can check the tf.data.Dataset documentation here: tf.data.Dataset  |  TensorFlow v2.16.1

if you want to build a tensorflow dataset from a list you can use data = tf.data.Dataset.from_tensor_slices(your_list) once you have this dataset, you can compute any other stuff wtih tf.data.Dataset methods and pass the dataset to your model, either with model.fit or looping through the elements of the dataset like in the documentation example (in that case you will need to create your custom training loop and training/test step)

1 Like