Your model and loss should accept batches without changes (forwarding tensor of size [N x 112] ). For example - stacking of inputs:
std::vector<double> data1(112);
std::vector<double> data2(112);
std::vector<double> data3(112);

auto input1 = torch::tensor(c10::ArrayRef(data1));
auto input2 = torch::tensor(c10::ArrayRef(data2));
auto input3 = torch::tensor(c10::ArrayRef(data3));

auto input = torch::stack({ input1, input2, input3 });

auto model = std::make_unique<TorchNet>(112);

auto output = model->forward(input); // size [3, 2]

Instead of creating batches in your code, you should probably create a custom dataset with stack transform which will do it for you → example