The snippet basically tells that, for every epoch the train_loader is invoked which returns x and y say input and its corresponding label. The second for loop is iterating over the entire dataset and the enumerate is simply assigning the i th value to the variable step which corresponds to the i th training example that is loaded. When the train_loader is invoked the training examples that are being loaded are normalized by the DataLoader via the transform argument which allows a combination of data preprocessing steps like resize, normalizing to [0,1], etc.