@eqy Thank you for your response. As you suggested, I have run a few tests to make sure am getting the expected output, it seems to be working as expected!
However, the fact that the bias is added after the convolution process, means that positions where mask(convolution(x))==0, will evaluate to 0+bias (after adding the bias term). So for now, I have set bias=False but it would be nice to also customize the bias term along with the masking process!