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 Inception-V4 for Fluid #672

Closed
wants to merge 2 commits into from

Conversation

xymyeah
Copy link

@xymyeah xymyeah commented Feb 27, 2018

resolve #647

@lcy-seso lcy-seso changed the title Models issues 647 Add Inception-V4 for Fluid Mar 2, 2018
import numpy
import paddle.v2 as paddle
import paddle.fluid as fluid
import math
Copy link
Collaborator

Choose a reason for hiding this comment

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

line 20 移动到 line 16行之后。在 import paddle.v2 之前空一行 :https://www.python.org/dev/peps/pep-0008/#imports

Copy link
Author

Choose a reason for hiding this comment

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

好的,以后会注意编码规范的问题

import math

__all__ = ['inception_v4']

Copy link
Collaborator

Choose a reason for hiding this comment

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

22 行移动到 15 行之后,并且空一行:https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names

input=input,
pool_size=3,
pool_stride=2,
# add
Copy link
Collaborator

Choose a reason for hiding this comment

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

line 50 行是否有特殊含义,如果没有则删除。

Copy link
Author

@xymyeah xymyeah Mar 2, 2018

Choose a reason for hiding this comment

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

已调整代码,等下次提交修复

input=input, num_filters=96, filter_size=3, stride=2, padding=1)
return fluid.layers.concat(input=[pool0, conv0], axis=1)

def block1(input):
Copy link
Collaborator

Choose a reason for hiding this comment

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

请为每一个 python函数添加docstring注释。风格可以参考 https://www.python.org/dev/peps/pep-0008/#documentation-strings

image = fluid.layers.data(name='image', shape=image_shape, dtype='float32')
label = fluid.layers.data(name='label', shape=[1], dtype='int64')

net = inception_v4(image, class_dim)
Copy link
Collaborator

Choose a reason for hiding this comment

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

请参考这个例子,增加多线程/多卡部分的代码。

Copy link
Author

Choose a reason for hiding this comment

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

请问例子在哪里,能否在提供一下?

Copy link
Collaborator

@lcy-seso lcy-seso Mar 3, 2018

Choose a reason for hiding this comment

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

sys.exit("got NaN loss, training failed.")
acc_list.append(float(acc_t))
avg_loss_list.append(float(loss_t))
break # Use 1 segment for speeding up CI
Copy link
Collaborator

Choose a reason for hiding this comment

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

line 357 在models下不需要,models下都是可以完整运行的例子。请删除这一行的逻辑。

fluid.io.save_inference_model(model_save_dir, ["image"],
[predict], exe)
return

Copy link
Collaborator

Choose a reason for hiding this comment

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

models 下都是可以直接运行的完整例子,line 367 ~ 370 不需要这部分。

@lcy-seso
Copy link
Collaborator

lcy-seso commented Mar 2, 2018

对models下代码merge要求是:需要保证收敛和学习效果,但不以对齐到论文state-of-art为merge的强制要求。请问PR中的 Inception-V4 模型收敛效果如何呢?能否在comment中提供训练效果数据呢?

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@xymyeah xymyeah closed this Mar 9, 2021
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.

Add Inception-V4 for Fluid.
3 participants