                if(f < {{pads_front}})
                {
                    new_f = 0;
                }
                if(f >= {{channels_and_pad_front}})
                {
                    new_f = -1;
                }

                if(i < {{pads_top}})
                {
                    new_i = 0;
                }
                if(i >= {{height_and_pad_top}})
                {
                    new_i = -1;
                }


                if(j < {{pads_left}})
                {
                    new_j = 0;
                }
                if(j >= {{width_and_pad_left}})
                {
                    new_j = -1;
                }