torch_geometric transforms RandomLinkSplit getting not enough memory

62 Views Asked by At

I am training a model on a graph data, so i have to use RandomLinkSplit. This is part of my code:

from torch_geometric.transforms import RandomLinkSplit
from torch_geometric.data import Data
data = Data(x=torch.eye(len(g.nodes)), edge_index=edge_index)
transform = RandomLinkSplit(is_undirected=True)
train_data, val_data, test_data = transform(data)

However, transform(data) is causing the error:

DefaultCPUAllocator: not enough memory: you tried to allocate 114376964580 bytes.

While I already have 64 GB RAM and

Data(x=torch.eye(len(g.nodes)), edge_index=edge_index)

is not getting more than 2 GB of the RAM.

0

There are 0 best solutions below