How do I change/update a registered parameter? I want to manually change the value of a tensor that is registered as a parameter.
        std::cout << selected_node->parameters() << std::endl;
        selected_node->value = selected_node->value + torch::randn({1});

        selected_node->parameters()[0] = selected_node->value;
        std::cout << selected_node->parameters() << std::endl;

This prints the same parameters twice.
        selected_node->register_parameter("value", selected_node->value);
        selected_node->value = selected_node->value + torch::randn({1});
        selected_node->register_parameter("value", selected_node->value);

“reregistering” is not allowed.
How do I update/change/alter a parameter that is already registered?