src/transformers/models/data2vec/modeling_tf_data2vec_vision.py/TFAdaptiveAvgPool1D/call
class TFAdaptiveAvgPool1D:    def call(self, inputs):
        if self.mode == "dense":
            return inputs @ self.map
        else:
            input_dims = inputs.shape
            input_matrix = tf.reshape(inputs, (-1, input_dims[-1]))
            out = tf.sparse.sparse_dense_matmul(input_matrix, self.map)
            return tf.reshape(out, input_dims[:-1].as_list() + [-1])