I've just got an M1 MacBook Pro and have been working on getting my development environment set up. I have followed instructions to install PyTorch with mini-forge so that it will run natively.
To test this, I've been running the MNIST example code from here. The code runs fine and Activity Monitor shows me that it is running natively. However, something still seems to be wrong: when the exact same code is executed on my other machine accuracy of 99% is achieved usually after one epoch, and test loss is very low. On the M1 Macbook, although training loss goes down, test loss never drops below 2 and accuracy never exceeds 10% after 14 epochs.
Similar issues occurred when running other code, e.g. this produces a loss of nan at every step.
I haven't been able to find this issue mentioned anywhere else: PyTorch is running natively on the M1, but it just doesn't seem to be working correctly.
I'd appreciate any suggestions as to what might be causing this or how I might fix it.
Thanks!