Skip to content

MNIST doesn't work on Mac mini m1 #915

Open
@DongqiShen

Description

@DongqiShen

I run it on my Mac mini m1, but the loss is always nan.
Then, I tried it on the Ubuntu and It worked.
It seems that pytorch doesn't work well on m1.

Activity

xshaun

xshaun commented on May 27, 2021

@xshaun

Is the random seed same one in your settings? It would be helpful if you have a try on other models and give more runtime information.

shreyaspadhy

shreyaspadhy commented on Sep 6, 2021

@shreyaspadhy

Hi Dongqi, did you have any followups to this issue? I am running into a closely related issue on an M1 Mac Mini where the default MNIST example does not seem to have good test time evaluation (accuracy is always chance ~10%), but the training loss goes down a significant amount. However, on a 2017 x86 Macbook Pro, the test accuracy reaches ~99% within 2 epochs, with similar training loss as the M1 machine. I'm happy to provide any further information to get to the bottom of this.

On both machines, I set up a Python, Conda and Pytorch Environment from scratch, following this tutorial pretty much exactly - https://towardsdatascience.com/yes-you-can-run-pytorch-natively-on-m1-macbooks-and-heres-how-35d2eaa07a83

I'm on Python 3.9.6 on both machines.

msaroufim

msaroufim commented on Mar 9, 2022

@msaroufim
Member

Super strange, that said for M1 updates I'd suggest following this thread instead pytorch/pytorch#47702 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @msaroufim@shreyaspadhy@xshaun@DongqiShen

        Issue actions

          MNIST doesn't work on Mac mini m1 · Issue #915 · pytorch/examples