Is there any example about pushing a module into a sequential? I have been stuck here two days.
“”"
torch::nn::Sequential layer1{ nullptr };
auto conv1 = torch::nn::Conv2d(torch::nn::Conv2dOptions(64, 64, 1).stride(1).bias(false));
layer1->push_back(conv1);
“”"
Then I got error: Accessing empty ModuleHolder
I have tried push_back(&conv1),push_back(std::move(conv1)), none of them worked and I cannot find any example on internet, is anyone can help?