Looking at the errors,
the output from the model.forward() will be a
torch::jit::IValue.
However the input to a model.forward() will be a std::vector<torch::jit::IValue>
Can you try this ?
auto output_o = onet.forward(inputs);

std::vector<torch::jit::IValue>temp_op;

temp_op.push_back(output_o);

auto output_p = pnet.forward(temp_op);