Found out, that I messed up the soft_update function:
it has to be:
torch::NogradGuard no_grad;
for (size_t i=0; i < target->parameters().size(); i++) {
    target->parameters()[i].copy_(tau*local->parameters()[i] + (1.0 - tau) * target->parameters()[i]);
}