@erict Thanks for the explanation - If your goal is to find an equivalent of torch.nn.PReLU layer in C++ API, you can use torch::nn::PReLU layer which behaves exactly like the Python version, and we can construct it like auto m = torch::nn::PReLU(torch::nn::PReLUOptions().num_parameters(42).init(0.25)) (num_parameters and init are optional). And we can access its weight attribute using m.weight, just like how we do it in Python.
If your goal is to make prelu1 in your C++ module point to the parameter registered with register_parameter("prelu1", prelu1.fill_(0.25));, we should replace it with prelu1 = register_parameter("prelu1", prelu1.fill_(0.25));, and then it should be properly registered.