Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

book/03.image_classification/vgg.py dropout module wrong #328

Closed
livc opened this issue Jun 5, 2017 · 2 comments
Closed

book/03.image_classification/vgg.py dropout module wrong #328

livc opened this issue Jun 5, 2017 · 2 comments

Comments

@livc
Copy link
Member

livc commented Jun 5, 2017

https://github.com/PaddlePaddle/book/blob/develop/03.image_classification/vgg.py#L40

Traceback (most recent call last):
  File "train.py", line 91, in <module>
    main()
  File "train.py", line 37, in main
    net = vgg_bn_drop(image)
  File "/home/lizhao/book/03.image_classification/vgg.py", line 40, in vgg_bn_drop
    drop = paddle.networks.dropout(input=conv5, dropout_rate=0.5)
AttributeError: 'module' object has no attribute 'dropout'

According to
https://github.com/PaddlePaddle/Paddle/blob/0beda8736ffcac80a95bea20f873d8972d2b5b5e/doc/api/v2/config/networks.rst#dropout_layer

This line should be

drop = paddle.networks.dropout_layer(input=conv5, dropout_rate=0.5)
@livc
Copy link
Member Author

livc commented Jun 15, 2017

Can we close this issue? @lcy-seso

@lcy-seso
Copy link
Contributor

Yes, this bug has been fixed by this PR PaddlePaddle/Paddle#2384, we can close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants