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

LinearClassifier does not have weights_ #5

Open
rzdulc opened this issue Aug 30, 2017 · 0 comments
Open

LinearClassifier does not have weights_ #5

rzdulc opened this issue Aug 30, 2017 · 0 comments

Comments

@rzdulc
Copy link

rzdulc commented Aug 30, 2017

In the latest version of tensorflow (1.3.0) the LinearClassifier object does not have a weights_ member. Instead, the weights have to be retrieved as follows:

weights = classifier.get_variable_value("linear//weight")

cseas added a commit to cseas/tutorials that referenced this issue Jul 16, 2018
Added fix for the following error on newer TensorFlow versions:
AttributeError: 'LinearClassifier' object has no attribute 'weights_'

Tested on Python 3.5.2 and TensorFlow 1.9.0
cseas added a commit to cseas/tutorials that referenced this issue Jul 16, 2018
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

1 participant