Thanks for the answer, I should’ve been more specific. I’m still not quite sure what you meant with weight_. Consider this super basic case:
torch::nn::Linear fc1 = {nullptr}; //assume this is initialied
torch::Tensor forward(torch::Tensor input) override 
{
        image = torch::softmax(fc1->forward(input));
        return image;
}

Now the thing I do in each thread would be something like
auto input_tensor = torch::tensor({1, 2, 3, 4, 5});
auto output_tensor =  net->forward(input_tensor);

// read data
float f = output_tensor.data<float>()[0]; //or something like that

If we assume the weights are fixed and no fancy training is going on, can I read from output_tensor safely? Just want to make sure