Convert tuple to tensor pytorch