Append or combine column wise torch tensors of different shapes
Tensors A and B below share the row size. The 6 and 3 refers to the columns of the 2 data frame, but the B tensor has at each cell a vector of size 256.
A= torch.Size([17809, 6])
B= torch.Size([17809, 3, 256])

How do I append combine these tensors?
More detail:
A column of 'A' is a numeric vector like 'Age', In B one of the 3 columns has a set of node embeddings (vector) of size 256.

You can apply torch.nn.Embedding on A to embedding numeric vector then use torch.cat to concat embeding of A and B on the axis=1.
(In the below code I use random tensors).
import torch
from torch import nn

num_embeddings = 10 # fill base Age
embedding_dim = 256 # fill base of B tensor
embedding = nn.Embedding(num_embeddings, embedding_dim)

A = torch.randint(10, (17809, 6))
print(f&quot;A   : {A.shape}&quot;)

E_A = embedding(A)
print(f&quot;E_A : {E_A.shape}&quot;)

B = torch.rand(17809, 3, 256)
print(f&quot;B   : {B.shape}&quot;)

C = torch.cat((E_A, B), 1)
print(f&quot;C   : {C.shape}&quot;)

Output:
A   : torch.Size([17809, 6])
E_A : torch.Size([17809, 6, 256])
B   : torch.Size([17809, 3, 256])
C   : torch.Size([17809, 9, 256])

