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

Add CE to dygraph Se-Resnext model #2699

Merged
merged 7 commits into from
Jul 4, 2019

Conversation

DDDivano
Copy link
Contributor

@DDDivano DDDivano commented Jul 3, 2019

Add ce to Se-resnext and fix unique_name bugs.

test_acc1 = AccKpi('test_acc1', 0.01, 0, actived=True, desc='test acc1')
test_acc5 = AccKpi('test_acc5', 0.01, 0, actived=True, desc='test acc5')
test_loss = CostKpi('test_loss', 0.01, 0, actived=True, desc='test loss')
#train_speed_kpi = DurationKpi(
Copy link
Contributor

Choose a reason for hiding this comment

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

多余的注释去掉吧

@tink2123
Copy link
Contributor

tink2123 commented Jul 4, 2019

麻烦帮忙修改unique name 的问题:

cost,pred = fluid.layers.softmax_with_cross_entropy(out,label,return_softmax=True)
avg_loss = fluid.layers.mean(x=cost)
acc_top1 = fluid.layers.accuracy(input=pred, label=label, k=1)
acc_top5 = fluid.layers.accuracy(input=pred, label=label, k=5)

请修改为:

softmax_out = fluid.layers.softmax(out,use_cudnn=False)
loss = fluid.layers.cross_entropy(input=softmax_out, label=label)
avg_loss = fluid.layers.mean(x=loss)
acc_top1 = fluid.layers.accuracy(input=softmax_out, label=label, k=1)
acc_top5 = fluid.layers.accuracy(input=softmax_out, label=label, k=5)

@tink2123
Copy link
Contributor

tink2123 commented Jul 4, 2019

LGTM

Copy link
Contributor

@junjun315 junjun315 left a comment

Choose a reason for hiding this comment

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

LGTM

@junjun315 junjun315 merged commit 9d690da into PaddlePaddle:develop Jul 4, 2019
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