-
Notifications
You must be signed in to change notification settings - Fork 78
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 demo of recognize_digits on paddlecloud #276
Add demo of recognize_digits on paddlecloud #276
Conversation
demo/recognize_digits/train.py
Outdated
|
||
|
||
def main(): | ||
paddle.init(use_gpu=False, trainer_count=1) |
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.
Please delete the parameter use_gpu
, cloud server will set the environment variable PADDLE_INIT_USE_GPU
according to CPU/GPU job, and the same to trainer_count
.
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. Thx.
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.
LGTM!
def prepare_dataset(): | ||
# convert will also split the dataset by line-count | ||
common.convert(TRAIN_FILES_PATH, | ||
paddle.dataset.mnist.train(), |
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.
可以直接用/pfs/%s/public/dataset
下的mnist数据集,这个是默认处理好了,集群上通常会预先存放一份。不过保留prepare方法可以示例用户如何预处理数据集。
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.
/pfs/%s/public/dataset
这个路径是不是不能用paddlecloud ls
来查看?
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.
嗯,目前有这个bug。
|
||
|
||
# NOTE: must change this to your own username on paddlecloud. | ||
USERNAME = "wanghaoshuang@baidu.com" |
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.
这里改成USERNAME = "demo"
?
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.
嗯嗯,demo可以。
Related: #147