Skip to content

RuntimeError: shape '[200,-1]' is invalid for input of size 2 #2

@fine4303

Description

@fine4303

Hello, I'm a newbie.
I had a little trouble running spiral/train_with_CBFs.py.
When I run "loss2.backward()", I find that it calls "y = y.contiguous().view(args.batch_time * args.batch_size,-1)" in dCBF(self, y, w_ref).
I found that y.shape = torch.Size([1,2]), so it says "RuntimeError: shape '[200,-1]' is invalid for input of size 2".

However, this command is required when I run "loss2 = func(batch_t, pred_y).to(device)".
I don't know how to solve this problem, please help me, thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions