Hi Thomas,
Thank you for your answer, the C++ is simple and the input tensor is ok(  I checked that, I also tried with torch::ones giving the same errors): Cuda or no Cuda : same errors.
    ....
    std::shared_ptr<torch::jit::script::Module> ptrModule = torch::jit::load(path_to_model));
    if (!ptrModule)
    {
        _ASSERT(false);
    }
    ptrModule->to(at::kCUDA);
    std::vector<torch::jit::IValue> inputs;
    std::vector<int64_t> sizes = { 1, 1, 320, 320 };
    at::TensorOptions options(at::ScalarType::Float);
    at::Tensor tensor_image = torch::from_blob((void*)m_testImage.GetBuffer(), at::IntList(sizes), options);
    tensor_image.to(at::kCUDA);
    inputs.push_back(tensor_image);
    auto outputs = ptrModule->forward(inputs).toTensor();
    ...

outputs is a NULL pointer…
Hope this is enough information.
Greetings,
Roos