.item() ensures that you append only the float values to the list rather the tensor itself. You are basically converting  a single element tensor value to a python number. This should not affect the performance in any way.