/// <summary> /// Given an element dimensions indices [N,H,W,C] return this element offset in memory, clamping indices to tensor dimensions. /// </summary> public int IndexWithClamp(int b, int h, int w, int ch) { return(shape.IndexWithClamp(b, h, w, ch)); }