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

Predicted Housing Price is NEGATIVE #11856

Closed
daming-lu opened this issue Jun 29, 2018 · 1 comment
Closed

Predicted Housing Price is NEGATIVE #11856

daming-lu opened this issue Jun 29, 2018 · 1 comment

Comments

@daming-lu
Copy link
Contributor

After training, when we use real Boston Housing Price to do prediction, Paddle gives negative housing price

https://github.com/daming-lu/Paddle/blob/911567b276844ecc18e5864eaa4c0761af7465c4/python/paddle/fluid/tests/book/high-level-api/fit_a_line/book_fit_a_line.py#L84

The data is here:

https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data

@luotao1
Copy link
Contributor

luotao1 commented Jun 30, 2018

I print the train loss

[luotao02@yq01-idl-gpu-jpaas-let01: Paddle] daming-lu-develop -> $ python python/paddle/fluid/tests/book/high-level-api/fit_a_line/book_fit_a_line.py
['275.66712951660156']
['237.9882723490397']
['239.83605448404947']
['235.4544194539388']
['218.99579366048178']
['234.24365997314453']
['201.47886403401694']
['227.6452865600586']
['200.10565948486328']
['195.2815793355306']
['193.22032165527344']
['193.18475850423178']
['207.57064819335938']
['183.79825083414713']
...
['15.914986769358316']
['17.338773886362713']
['18.464251200358074']
['18.860468069712322']
['16.344685395558674']
['14.922477841377258']
['16.406979084014893']
('infer results: ', array([[-459.6747],
       [-401.6311]], dtype=float32))

It seems that the train loss is normal, but the infer result is error.
Maybe you can check whether the inference_program is the inference of trainer_program.

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

No branches or pull requests

2 participants