Solved by ptrblck in post #20 
              
              
                There seem to be some issues regarding the shape in the forward method. 
Currently, input[j][0][:, start_col_indx:end_col_indx] will have the shapes: 
torch.Size([2, 2])
torch.Size([2, 1])
torch.Size([2, 0])

which will create an error. 
Did you forget to increase the end_col_index? 
Also, I might h…