jiangzhongshi / SurfaceNetworks

Source code for CVPR 2018 Oral paper "Surface Networks"
91 stars 20 forks source link

Issues running mesh_mnist/main.py #8

Open DaddyWesker opened 2 years ago

DaddyWesker commented 2 years ago

Hello and thanks for your code.

Don't know if i'll get any answers, but anyway.

I'm trying to launch main.py (with default settings) in mesh_mnist folder (i've downloaded mesh mnist of course from the google drive links). Training crashes on the line: outputs = model(inputs, laplacian, mask)

If we'll look deeper, it crashes here: xs = [x, torch.mm(L,x.view(-1, feat)).view(batch, node, feat)] (167 line of src/utils/utils_pt.py file).

It says The expanded size of the tensor (64) must match the existing size (503) at non-singleton dimension 0. Target sizes: [64, 64]. Tensor sizes: [503, 64]

It is torch.mm failing because L is (64,503,503) and x.view(-1, feat) is (32192, 64). By the way, as i know, torch.mm uses 2D tensors as input, no? Well, does anyone launched that and could advice something?

jiangzhongshi commented 2 years ago

Hi,

It is likely that it’s a version difference, since the code is quite old. I can check later but I might be slow this week.

On Mon, Aug 1, 2022 at 3:31 AM DaddyWesker @.***> wrote:

Hello and thanks for your code.

Don't know if i'll get any answers, but anyway.

I'm trying to launch main.py (with default settings) in mesh_mnist folder (i've downloaded mesh mnist of course from the google drive links). Training is crashes on the line: outputs = model(inputs, laplacian, mask)

If we'll look deeper, it crashes here: xs = [x, torch.mm(L,x.view(-1, feat)).view(batch, node, feat)] (167 line of src/utils/utils_pt.py file).

It says The expanded size of the tensor (64) must match the existing size (503) at non-singleton dimension 0. Target sizes: [64, 64]. Tensor sizes: [503, 64]

It is torch.mm failing because L is (64,503,503) and x.view(-1, feat) is (32192, 64). By the way, as i know, torch.mm uses 2D tensors as input, no? Well, does anyone launched that and could advice something?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/jiangzhongshi/SurfaceNetworks/issues/8__;!!BhJSzQqDqA!XWxs2MamR4iboNouHWjs1BYhFoR8zrJg6tRdNtHBX0pzwAVzdOe5ET-A4r78pspsOQE2lq7sI0VbCPuWkp5rXKjxdQ$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ADBLCF7KY4RQC7NXPCMYJ5LVW54OFANCNFSM55GQFJ6A__;!!BhJSzQqDqA!XWxs2MamR4iboNouHWjs1BYhFoR8zrJg6tRdNtHBX0pzwAVzdOe5ET-A4r78pspsOQE2lq7sI0VbCPuWkp4V8vr1Zw$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Best,

Zhongshi Jiang New York University

DaddyWesker commented 2 years ago

Hello, I guess you meant torch version? I can try to install 1.0.0 of course, but i'm not sure I'll be able to since my rtx 3070 demands cuda 11+ and torch 1.0.0 wont support it. So I'll be launching on cpu which is super slow.

jiangzhongshi commented 2 years ago

Hi,

I take a brief look at it. It seems to be a mistake during code refactoring.

In another “normal prediction” folder I have diagonally concatenated L with laplacian = util.sparse_diag_cat(laplacian, sample_batch.num_vertices, sample_batch.num_vertices)

in the sampler, but here MNIST it is not refactored

On Tue, Aug 2, 2022 at 1:26 AM DaddyWesker @.***> wrote:

Hello, I guess you meant torch version? I can try to install 1.0.0 of course, but i'm not sure I'll be able to since my rtx 3070 demands cuda 11+ and torch 1.0.0 wont support it. So I'll be launching on cpu which is super slow.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/jiangzhongshi/SurfaceNetworks/issues/8*issuecomment-1202032337__;Iw!!BhJSzQqDqA!RgVPR91C0mozgMRAcS3PjlCx2eBxrmndHxRh3I-VRGzHhDCsVlgi8wQCxIXup63rWpttuSmwpKqXdiBzSHp8LxpANw$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ADBLCF5PLLZO2EPWLVFEV3LVXCWPXANCNFSM55GQFJ6A__;!!BhJSzQqDqA!RgVPR91C0mozgMRAcS3PjlCx2eBxrmndHxRh3I-VRGzHhDCsVlgi8wQCxIXup63rWpttuSmwpKqXdiBzSHooJwvqjA$ . You are receiving this because you commented.Message ID: @.***>

jiangzhongshi commented 2 years ago

It may help me to have more information: which specific file and branch are you running into problems?

there was indeed an effort to try to make L/Laplaican to be a 2d matrix. but might miss somewhere.

DaddyWesker commented 2 years ago

So, should i add this diagonal concatenation to the mnist? Place it before torch.mm?

I'm running master branch. main.py in mesh_mnist folder.