Skip to content

[debug]debug with profiler#80

Open
dzhwinter wants to merge 1 commit into
masterfrom
debug/memory
Open

[debug]debug with profiler#80
dzhwinter wants to merge 1 commit into
masterfrom
debug/memory

Conversation

@dzhwinter
Copy link
Copy Markdown
Owner

No description provided.

Comment thread fluid/vgg16.py
import argparse
import functools

import paddle.v2.fluid.profiler as profiler
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

paddle.fluid ,前几行也须进行相应修改。

Comment thread fluid/vgg16.py
@@ -94,23 +97,24 @@ def main():
# Evaluator
accuracy = fluid.evaluator.Accuracy(input=predict, label=label)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fluid.evaluator 下无 Accuracy,请针对本文件所有相应地方做相应修改。

Comment thread fluid/resnet50.py
@@ -190,7 +190,7 @@ def run_benchmark(model, args):
opts = optimizer.minimize(avg_cost)
accuracy = fluid.evaluator.Accuracy(input=predict, label=label)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fluid.evaluator 下无 Accuracy,请针对本文件所有相应地方做相应修改。
以及前面的 paddle.v2.fluid -> paddle.fluid

Comment thread fluid/mnist.py
(pass_end - pass_start) / 1000))
with profiler.profiler(args.device, 'total') as prof:
for pass_id in range(args.pass_num):
accuracy.reset(exe)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fluid.evaluator 下无 Accuracy,请针对本文件所有相应地方做相应修改。
以及前面的 paddle.v2.fluid -> paddle.fluid

Comment thread fluid/mnist.py
loss = np.array(outs[0])
acc = np.array(outs[1])
print("pass=%d, batch=%d, loss=%f, error=%f, elapse=%f" %
(pass_id, batch_id, loss, 1 - acc, (end - start) / 1000))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

计时建议带上单位,以及 这里是要以 ks 为单位吗?
(下同)

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.

2 participants