Applying custom mask on kernel for CNN

Ah, it works when the mask generation code is moved up to __init__

Maybe the to("cuda") wasn’t being inherited properly because I had defined a separate internal function to generate my mask