Haha, I was also wondering, why the Keras code was that worse.
I just assumed you’ve used MNIST based on the topic. 
Yes, the FashionMNIST dataset is also available via torchvision.datasets. The code should also work for FashionMNIST just by chaning the name of the dataset.
The tutorials 8 are also very helpful to get started.