def embedding_concat(x, y):
    (B, C1, H1, W1) = x.size()
    (_, C2, H2, W2) = y.size()
    s = int((H1 / H2))
    x = F.unfold(x, kernel_size=s, dilation=1, stride=s)
    x = x.view(B, C1, (- 1), H2, W2)
    z = torch.zeros(B, (C1 + C2), x.size(2), H2, W2)
    for i in range(x.size(2)):
        z[:, :, i, :, :] = torch.cat((x[:, :, i, :, :], y), 1)
    z = z.view(B, (- 1), (H2 * W2))
    z = F.fold(z, kernel_size=s, output_size=(H1, W1), stride=s)
    return z
def embedding_concat(x, y):
    (B, C1, H1, W1) = x.size()
    (_, C2, H2, W2) = y.size()
    s = int((H1 / H2))
    x = F.unfold(x, kernel_size=s, dilation=1, stride=s)
    x = x.view(B, C1, (- 1), H2, W2)
    z = torch.zeros(B, (C1 + C2), x.size(2), H2, W2)
    for i in range(x.size(2)):
        z[:, :, i, :, :] = torch.cat((x[:, :, i, :, :], y), 1)
    z = z.view(B, (- 1), (H2 * W2))
    z = F.fold(z, kernel_size=s, output_size=(H1, W1), stride=s)
    return z