Hi @albanD, @yf225

thanks for your answer. Yes i had a look at the docs. I will try to explain better. On python implementation inside Prelu class here https://pytorch.org/docs/stable/_modules/torch/nn/modules/activation.html#PReLU you can find `self.weight = Parameter(torch.Tensor(num_parameters).fill_(init))`

and by default self.weights is added to the model’s Parameters if i have understood well.

On pytorch c++ i have some doubts on how to use “self.weights” Tensor and pass to the prelu function. Now i’m using register_parameter in the constructor of the model like this `register_parameter("prelu1", prelu1.fill_(0.25));`

where prelu is `torch::Tensor prelu1 = torch::ones({1})`

In the forward i use the function like this `x = torch::prelu(inputs,prelu1);`

Is this a correct way to register the Tensor to the model like python version?

This is what i have done.

```
struct TestImpl : nn::Module {
TestImpl() : conv1(register_module("conv1", nn::Conv2d(nn::Conv2dOptions(1, 32, 4).stride(2).padding(1)))){
register_parameter("prelu1", prelu1.fill_(0.25));
}
torch::Tensor forward(torch::Tensor x) {
x = torch::prelu(x, prelu1);
}
nn::Conv2d conv1;
torch::Tensor prelu1 = torch::ones({ 1 });
};
```

Thanks