iOS 10.3 converts HFS+ (Core Storage) to APFS in-place by generating and writing the new metadata into free/empty space and then swapping the filesystem. See the following archived WWDC video:
Introducing Apple File System (developer access required, transcription below)
Apple will provide an in-place upgrade path from HFS+ to Apple File System. In doing this, the user data will remain exactly where it is and we will write, or Apple will write the APFS metadata, brand new, into the HPF+ free space.
And we're doing this for crash protection. This is a multi-second to multi-minute operation potentially.
And over that time, if the device loses power, panics, anything bad happens we want the data on the device to be safe and sound as if nothing had ever happened.
So the Apple File System Converter will try to be as atomic as possible. It's not completely instantaneous, but as the operation is ongoing, if the device crashes, we intend for it to be completely as if nothing had ever happened.