Template Function torch::nn::parallel::replicate(const ModuleHolder<ModuleType>&, const std::vector<Device>&)¶
Defined in File data_parallel.h
Function Documentation¶
-
template<typename ModuleType>
std::vector<ModuleHolder<ModuleType>> torch::nn::parallel::replicate(const ModuleHolder<ModuleType> &module, const std::vector<Device> &devices)¶ Replicates a module holder on the given list of devices.
This method allows calling
replicate()
with a module holder, such asLinear
.