I have a root file that has 360 variables in the TTree. Each variable outputs a 1 or 0 to represent an on or off pixel (18 variables for each row, with a total of 20 rows). Now I want to transform these into a 2D image to feed into the TMVA_CNN_Classification code. How do I properly do that? The example root file is already in an image format, but I’m not sure how to transform my TTree in such a way. Could I simply load each variable one by one in the correct order, and the code knows that it’s taking it in as an image? Such as:
model = Sequential()
model.add(Reshape((20, 18, 1), input_shape=(360,)))
Or do I have to do another step in between? Thank you so much.