Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

add example: MLP on mnist #28

Merged
merged 4 commits into from
Jun 23, 2018
Merged

Conversation

tonyyang-svail
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@kexinzhao kexinzhao left a comment

Choose a reason for hiding this comment

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

LGTM.

auto loss = mean(cross_entropy(predict, label));
if (i % print_step == 0) {
avg_loss +=
loss->Value().Get<paddle::framework::LoDTensor>().data<float>()[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor thing: this avg_loss update step need to be outside if. I can fix this in my pr.

@kexinzhao kexinzhao merged commit b9370a0 into PaddlePaddle:develop Jun 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants