Solved by tom in post #5 
              
              
                You follow the tutorial and at step 4 you replace 
at::Tensor output = module->forward(inputs).toTensor();

with 
torch::Tensor output = module->run_method("weighted_kernel_sum", input).toTensor();

where input is your input tensor. 
Best regards 
Thomas