Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labels的维度和预测结果维度不一致 #3

Open
Tesla-1i opened this issue Mar 7, 2022 · 1 comment
Open

labels的维度和预测结果维度不一致 #3

Tesla-1i opened this issue Mar 7, 2022 · 1 comment

Comments

@Tesla-1i
Copy link

Tesla-1i commented Mar 7, 2022

    predictions = model(features)
    print('shape: ', features.shape, predictions.shape, labels.shape)

shape: torch.Size([32, 39]) torch.Size([32, 1]) torch.Size([32])

labels的维度和预测结果维度不一致

@yqqCheergo
Copy link

在模型的forward里加一个outputs = outputs.squeeze(-1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants