dog1_out = output[0, 2] # First "dog" dog2_out = output[0, 5] # Second "dog" as per code but let me correct if i am wrong Token Index "The" 0 "dog" 1 "chased" 2 "another" 3 "dog" 4 so to compare it must be dog1_out = output[0, 1] and dog2_out = output[0, 4]