Fix autenc code for CNN