Stefano_Setti:

So by using the channel_last i just need the dataset without permuting it, right?


Yes, as shown in the linked tutorial.
Note that changing the memory layout will not fix the accuracy issue, so you might want to fix this first e.g. by playing around with some hyperparameters.