The former seems to be a tensor while the latter was transformed into a numpy array.
I guess that the for loops might not be executed in the same way so you could add e.g. print statements to convert_image to verify if both dicts are indeed transformed.