Creating my tensorflow dataset from multiple binary files

I am fairly new to tensorflow, python and machine learning in general but have made a lot of progress in the last few months. I have a CNN that I have used on png images, but I would like to use that CNN with another dataset. Each ‘image’ in this new dataset includes 7 separate matrices stored in 7 different binary format files. I want each matrix to be a channel (shape = x, x, 7). The mask is a single matrix in a single binary formatted file. I am not sure how to preprocesses this type of data to prepare it for the model. Any help, guidance or links to helpful sources is greatly appreciated.


Have you tried to write your decode function like in:

I have not, but this looks great. I’ll give it a shot this week. Thank you!