3 #include <test/cpp/common/support.h> 5 #include <gtest/gtest.h> 7 #include <torch/nn/cloneable.h> 8 #include <torch/types.h> 9 #include <torch/utils.h> 23 template <
typename ModuleHolder>
25 ModuleHolder module_holder,
26 std::string
name = std::string()) {
27 return Module::register_module(std::move(
name), module_holder);
32 return first.data<
float>() == second.data<
float>();
37 torch::manual_seed(0);
const std::string & name() const noexcept
Returns the name of the Module.
The clone() method in the base Module class does not have knowledge of the concrete runtime type of i...
void reset() override
reset() must perform initialization of all members with reference semantics, most importantly paramet...