1, x_offset, y_offset;
        index_of_input_dim0 = index_of_dim0 / scales[0];
        y_offset = index_of_dim0 - index_of_input_dim0 * scales[0];
        index_of_input_dim1 = index_of_dim1 / scales[1];
        x_offset = index_of_dim1 - index_of_input_dim1 * scales[1];

        input_index = index_of_input_dim0 * input_pitches[0] + index_of_input_dim1;

        float x00 = getInputFloat(input_index);
        float x10, x01, x11;

        bool end_of_dim0 = false;
        if (index_of_input_dim0 == (