How to give a node multiple vectors as initialization

like this :
Let node[0] have two vector as its representation?
maybe I can use view func but it is not so convenient

I suppose you intend to use a high-dimensional tensor for node feature rather than a 1D vector, which is allowed. You just need to replace torch.rand(2,3) by torch.rand(1, 2,3). Zero tensors will be initialized for the rest nodes.

how to do like this?
node[0] has a tensor of size 4x5 but node[1] has a tensor of size 5x5? the size of vector 4 or 5 are not same.the key should be on ‘ww’.

No you can’t do this. Could you share your scenario with us about why you want such operation?

just to store some attributes with different size on node using one name.
there are many other methods to do dict()
thank you for your reply.