It's going to be warm for about an hour or so depending on how many photos you have on your phone. It's likely re-scanning the face data for Photos, and otherwise re-indexing and cleaning up the install files. You would have the exact same heat if you reverted back to iOS 10, since it would need to do the exact same thing. Give it a few hours / leave it plugged into a power source.