Solved by KFrank in post #2 
              
              
                Hi Tomek! 

Package your nbatch dimension as “channels” (in_features) 
and then use conv1d()'s groups feature so that you apply each 
weight vector in your batch of weight vectors separately to the 
corresponding “channel” of your input. 
Here is your code with the “groups” version added on at the e…