I’m getting the same crash in the constructor. What i can see is that the register_module(...) call tries to insert an element into a borked children_ object.

uninitialized_data_pytorch.png794×170 13.6 KB

UPDATE:
Found it. There is a layout mismatch between debug/release. This messes up the inline defined register_module. In a Release build everything works as intended. The std:: objects in OrderedDict have different layouts. Maybe a debug dll or pimpl Module?
UPDATE:
Reported it as an issue on GitHub