I don’t know exactly what difference you would like to highlight.
In the first approach train_inputs and train_labels seem to be undefined (as well as validation_x), so I assume you would like to use x_train etc.?
Also, the DataLoader loop is different, since you are unpacking the values in the first approach inside the loop (but that doesn’t matter and is just different coding style).
Are these the differences or what would you like to discuss?