Solved by ptrblck in post #4 
              
              
                Thanks for the code snippet. 
Your approach looks valid assuming you are using different images in f_img. 
However, based on your previous description: 

it seems that f_img would contain only a single unique image and you are repeating it in the batch dimension to use the view operation with the gr…