you can try following code:

    auto val_out = out[1].toList().get(0).toGenericDict();
    auto boxes = val_out.at("boxes");
    auto scores = val_out.at("scores");


    at::Tensor bbox = boxes.toTensor().data();
    at::Tensor bscore = scores.toTensor().data();