mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
0dabaad819
Summary: This adds a replace_module method to the C++ api. This is needed to be able to replace modules. The primary use case I am aware of is to enable finetuning of models. Given that finetuning is fairly popular these days, I think it would be good to facilitate this in the C++ api as well. This has been reported by Jean-Christophe Lombardo on the [forums](https://discuss.pytorch.org/t/finetuning-a-model-on-multiple-gpu-in-c/49195). Pull Request resolved: https://github.com/pytorch/pytorch/pull/22546 Differential Revision: D16440289 Pulled By: yf225 fbshipit-source-id: c136f914b8fc5c0f1975d877ea817fda5c851cda