Replies: 1 comment
-
transform = T.Constant(cat=False)
dataset = TUDataset(path, name='MUTAG', transform=transform) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cxw-droid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How can I make a dataset (e.g,. MUTAG) featureless (e.g. make all features be
1
) after I get the dataset from TUDataset(). When I tried to set each graph Data bydata.x = torch.Tensor([1]*len(data.x))
, the original graphData.x
is not changed, and when I tried to create a new list of graphs Data, the new list has no properties such asnum_features
.So my questions is: Is there a convenient way to transform the default MUTAG dataset to a featureless one, at the same time keeping the original properties like
num_features
etc? Thanks.Beta Was this translation helpful? Give feedback.
All reactions