Please see PSA: how to quote code with backticks on how to quote your code to make it more readable to others.
For me, on GPU, running without the callback it takes 7 seconds for 10 epochs with a 2080 Ti. With the callback it takes longer than I have patience to wait. To run the onecold
on CPU do:
accuracy(x, y) = mean(onecold(cpu(m(x))) .== onecold(cpu(y)))