-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
python wrap for resize layer #1853
Conversation
Please refer to this PR to add the unit test. |
Thanks to @pengwangucla for this PR! It would be great if we can have unit tests as well. It seems that the PR mentioned by @qingqing01 is a reference. Please let us know if we can help with the tests. |
Sure I will finish it soon. Sorry for missing the comments
…On Sun, Apr 30, 2017 at 7:35 PM, Yi Wang ***@***.***> wrote:
Thanks to @pengwangucla <https://github.com/pengwangucla> for this PR! It
would be great if we can have unit tests as well. It seems that the PR
mentioned by @qingqing01 <https://github.com/qingqing01> is a reference.
Please let us know if we can help with the tests.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1853 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEk8dPP6IBSA0m4CYt2G60s6-md6pzf_ks5r1UTngaJpZM4NE2iH>
.
--
Jerry Wang(王鹏)
Department of Statistics
University of California, Los Angeles
Skype: jerrykingpku
Phone: +86 15901042108
|
@qingqing01 How to run the test.py file, I met this error. Is there a document for this ? Traceback (most recent call last):
File "python/paddle/trainer_config_helpers/tests/configs/test_smooth_l1.py", line 3, in <module>
data = data_layer(name='input', size=300)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer_config_helpers/layers.py", line 270, in wrapper
return method(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer_config_helpers/layers.py", line 774, in data_layer
**ExtraLayerAttribute.to_kwargs(layer_attr))
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 3236, in Layer
return layer_func(name, **xargs)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 1699, in __init__
name, 'data', size, inputs=[], device=device)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 1380, in __init__
name = MakeLayerNameInSubmodel(name)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 298, in MakeLayerNameInSubmodel
if (submodel_name is None and not g_add_submodel_suffix and
NameError: global name 'g_add_submodel_suffix' is not defined |
@jacquesqiao can you take a look at this? |
@pengwangucla run the unit test as follows,
|
So someone should update the document for writing new layers to add python test. |
@qingqing01 @wangkuiyi Add python test and also add '\n' for test_config_parser since someone may not notice to have '\n' at last in the test python file. |
@pengwangucla The travis-ci is broken, please fix it. |
what is the pre-commit version online ? I always fail the precommit @luotao1 |
@luotao1 @qingqing01 @wangkuiyi Fixed the issue |
@@ -17,6 +17,8 @@ | |||
import re | |||
import getopt | |||
|
|||
from paddle.trainer.config_parser import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请问这个文件的修改是必须的么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Close due to 9b54ad1 |
Does not have a test outside in v2, but it works in my code. I don't know whether I need to add it manually.