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

softmax cross entropy support high rank #16798

Merged
merged 8 commits into from
Apr 16, 2019

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Apr 11, 2019

softmax cross entopy support high rank

@phlrain phlrain requested review from chengduoZH and kuke April 15, 2019 02:28
if ((!ctx->IsRuntime()) && (framework::product(logits_dims) <= 0 ||
framework::product(labels_dims) <= 0)) {
check = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool check = ctx->IsRuntime() || (framework::product(logits_dims) > 0 &&  framework::product(labels_dims) > 0);

auto loss_dims = logits_dims;
loss_dims[rank - 1] = 1;
ctx->SetOutputDim("Loss", loss_dims);
// ctx->SetOutputDim("Loss", {logits_dims[0], 1});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 142 should be removed.

@kuke
Copy link
Contributor

kuke commented Apr 15, 2019

No more comments

@phlrain phlrain merged commit d5a7c09 into PaddlePaddle:develop Apr 16, 2019
phlrain added a commit to phlrain/Paddle that referenced this pull request Apr 16, 2019
…ort_high_rank

softmax cross entropy support high rank
phlrain added a commit that referenced this pull request Apr 17, 2019
Merge pull request #16798 from phlrain/softmax_cross_support_high_rank
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

Successfully merging this pull request may close these issues.

3 participants