Solved by tom in post #3 
              
              
                Hello Alexander, 
I can confirm this and took the liberty to file QNNPACK mean with keepdim doesn't work · Issue #58668 · pytorch/pytorch · GitHub . Thank you so much for reporting this with very precise repro information! This makes things much easier. 
For reference: This illustrates the problem: 
…