pyHGT icon indicating copy to clipboard operation
pyHGT copied to clipboard

RUN-ERROR: got an unexpected keyword argument 'node_dim'

Open jm-huang opened this issue 4 years ago • 1 comments

comment:

python3 train_paper_field.py --data_dir dataset --model_dir PATH_OF_SAVED_MODEL --conv_name hgt --domain _NN

result:

Traceback (most recent call last): File "train_paper_field.py", line 192, in num_types = len(graph.get_types()), num_relations = len(graph.get_meta_graph()) + 1).to(device) File "pyHGT-master/OAG/pyHGT/model.py", line 66, in init self.gcs.append(GeneralConv(conv_name, n_hid, n_hid, num_types, num_relations, n_heads, dropout, use_norm = prev_norm, use_RTE = use_RTE)) File "pyHGT-master/OAG/pyHGT/conv.py", line 308, in init self.base_conv = HGTConv(in_hid, out_hid, num_types, num_relations, n_heads, dropout, use_norm, use_RTE) File "pyHGT-master/OAG/pyHGT/conv.py", line 13, in init super(HGTConv, self).init(node_dim=0, aggr='add', **kwargs) TypeError: init() got an unexpected keyword argument 'node_dim'

How can I fixed it ?

jm-huang avatar Jan 19 '21 14:01 jm-huang

Hi, can I know which PyG version you are using?

I add this node_dim to solve another issue that occur in latest pyG. You can simply try delete the node_dim = 0 to see whether it works, or I highly recommend you use the latest pyG.

acbull avatar Jan 19 '21 18:01 acbull