Thanks for the reply. Tried that before. I included the prefixing as that was one of the things I suspected made the pytorch version slow. Adding the prefetching made it slightly faster. As noted above, I now suspect the transpose convolution to be the culprit.