code: @Override
      public Tensor forward() {
          Tensor x = modIn.getOutput();
          y = x.select(dim, idx);
          return y;
      }
docs: Foward pass: y[i] = x[j], where j = (i1, i2, ..., i(d-1), k, i(d+1), ..., i(n))