Solved by InnovArul in post #8 
              
              
                Remember that pytorch is based on dynamic computation graphs, where as tensorflow is based on static computation graphs. Hence, you need to calculate filter in forward() rather than __init__(). 


You do not need to move individual parameters to cuda. Rather try to move whole model to cuda.