I would like to use 1- padding instead of 0.
The default value is : padding_mode=‘zeros’, but I would it to be ‘ones’, it doesn’t exist, how could i do it ?
I think it’s not possible because mainly it is a bad idea because the value 1 has no meaning, but in my case, for the first layer, it does. Either i find a nice solution to do it like that or i change my first layer to : x=1-x
You are welcome, Actually, you have not provided much information about what you want to do. But if your problem is padding as you mentioned previously, you can do it using the snippet. But yes, you can now feed it in forward function to a conv2d.
I use this padding for the first conv layer of a Go IA.
Thanks Nik, I’ll try next week (I first have to learn pybind11 to reuse C++ code) you’re solution