Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Tensor size mismatch error when dynamic options are used #33

@SmnKr

Description

@SmnKr

Hi @muhanzhang,

I've used this model for link prediction on a few datasets. Recently, when I run it on two of my new datasets with dynamic run type options, i.e. --dynamic_train --dynamic_val --dynamic_test, I get the following error at run-time. I should mention that if I don't use the above options, namely if I use the in-memory run type, it runs successfully. Do you know what causes the error and how can I fix it?

File "/nfstmp/.../seal_link_pred.py", line 708, in
model.load_state_dict(torch.load(model_name))
File "/nfstmp/.../python3.7/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DGCNN:
size mismatch for lin1.weight: copying a param with shape torch.Size([128, 800]) from checkpoint, the shape in current model is torch.Size([128, 1344]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions