Yes sure.
In this cases, h tensors are the last hidden states of a RNN.
I built a_input as follow (I propose an example instead).
In [8]: import torch

In [9]: import numpy as np

In [10]: h = torch.LongTensor(np.array([[1,1], [2,2], [3,3]]))

In [11]: N=3

In [12]: h.repeat(1, N).view(N * N, -1)
Out[12]: 

    1     1
    1     1
    1     1
    2     2
    2     2
    2     2
    3     3
    3     3
    3     3
[torch.LongTensor of size 9x2]

In [13]: h.repeat(N, 1)
Out[13]: 

    1     1
    2     2
    3     3
    1     1
    2     2
    3     3
    1     1
    2     2
    3     3
[torch.LongTensor of size 9x2]

Is it clearer ?
The behavior is exactly as you describe. In my snippet, you receive a batch of hidden representations (one row per sample) and should compute the attention among the whole batch.
Thank you for your help !
PS: Here is the original paper https://arxiv.org/pdf/1710.10903.pdf 1
PS2: My Pytorch implementation of this paper is available in https://github.com/Diego999/pyGAT 2, which produces results as expected.