Solved by glaringlee in post #2 
              
              
                You never have std::shared_ptr<MySequential>. 
The underlying is always std::shared_ptr<MySequentialImpl>. 
MySequential is defined like this: 
‘https://github.com/pytorch/pytorch/blob/a54416d208cd024779455c7b44e7b86f51a3da45/torch/csrc/api/include/torch/nn/pimpl.h#L202’ 
It is actually a ModuleHold…