Hi Thomas,
Thank you. Now it works:
    auto outputs = m_ptrModule->get_method("forward").graph()->outputs();
    auto asTuple = outputs[0]->type()->cast<c10::TupleType>();
    if (asTuple)
    {
        m_nNumOutputs = asTuple->elements().size();
    }
    else
    {
        m_nNumOutputs = 1;
    }

Greetings,
Roos