{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3193","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3193/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3193/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3193/events","html_url":"https://github.com/tensorflow/tensorflow/issues/3193","id":163821655,"number":3193,"title":"AttributeError: 'LinearClassifier' object has no attribute 'save'","user":{"login":"Vijayenthiran","id":2136542,"avatar_url":"https://avatars.githubusercontent.com/u/2136542?v=3","gravatar_id":"","url":"https://api.github.com/users/Vijayenthiran","html_url":"https://github.com/Vijayenthiran","followers_url":"https://api.github.com/users/Vijayenthiran/followers","following_url":"https://api.github.com/users/Vijayenthiran/following{/other_user}","gists_url":"https://api.github.com/users/Vijayenthiran/gists{/gist_id}","starred_url":"https://api.github.com/users/Vijayenthiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vijayenthiran/subscriptions","organizations_url":"https://api.github.com/users/Vijayenthiran/orgs","repos_url":"https://api.github.com/users/Vijayenthiran/repos","events_url":"https://api.github.com/users/Vijayenthiran/events{/privacy}","received_events_url":"https://api.github.com/users/Vijayenthiran/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20response","name":"awaiting response","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-05T10:42:22Z","updated_at":"2016-07-09T15:46:47Z","closed_at":null,"body":"### Environment info\r\nOperating System:\r\nOS X 10.11.5\r\n\r\nInstalled version of CUDA and cuDNN: \r\n(please attach the output of `ls -l /path/to/cuda/lib/libcud*`):\r\nNA\r\n\r\nIf installed from binary pip package, provide:\r\n\r\n1. Which pip package you installed.\r\n2. The output from `python -c \"import tensorflow; print(tensorflow.__version__)\"`.\r\n\r\nTensor Flow verison: `0.9`\r\n\r\nIf installed from sources, provide the commit hash:\r\nCommit Hash:` 70de76e696c21da617fd2e6435cf7fedab220db8`\r\n\r\n### Steps to reproduce\r\n1. Run the example commands give at [sklearn doc](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/learn/python/learn#linear-classifier)\r\n2. Try to save the model with .save() function [sklearn doc](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/learn/python/learn#saving--restoring-models)\r\n\r\n### What have you tried?\r\n1. I tried using `tf.train.Saver()` but I guess it can save the session but not the classifier.\r\n\r\n### Logs or other output that would be helpful\r\n(If logs are large, please upload as attachment).\r\n\r\n```python\r\nPython 2.7.10 (default, Oct 23 2015, 19:19:21) \r\n[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import tensorflow.contrib.learn as learn\r\n>>> from sklearn import datasets, metrics\r\n>>> iris = datasets.load_iris()\r\n>>> classifier = learn.LinearClassifier(n_classes=3)\r\n>>> classifier.fit(iris.data, iris.target, steps=200, batch_size=32)\r\nLinearClassifier()\r\n>>> classifier.save('/tmp/tf_examples/my_model_1/')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nAttributeError: 'LinearClassifier' object has no attribute 'save'\r\n>>> import tensorflow as tf\r\n>>> saver = tf.train.Saver()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/Vijay/Library/Python/2.7/lib/python/site-packages/tensorflow/python/training/saver.py\", line 837, in __init__\r\n    raise ValueError(\"No variables to save\")\r\nValueError: No variables to save\r\n>>> \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/231540743","html_url":"https://github.com/tensorflow/tensorflow/issues/3193#issuecomment-231540743","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3193","id":231540743,"user":{"login":"Vijayenthiran","id":2136542,"avatar_url":"https://avatars.githubusercontent.com/u/2136542?v=3","gravatar_id":"","url":"https://api.github.com/users/Vijayenthiran","html_url":"https://github.com/Vijayenthiran","followers_url":"https://api.github.com/users/Vijayenthiran/followers","following_url":"https://api.github.com/users/Vijayenthiran/following{/other_user}","gists_url":"https://api.github.com/users/Vijayenthiran/gists{/gist_id}","starred_url":"https://api.github.com/users/Vijayenthiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vijayenthiran/subscriptions","organizations_url":"https://api.github.com/users/Vijayenthiran/orgs","repos_url":"https://api.github.com/users/Vijayenthiran/repos","events_url":"https://api.github.com/users/Vijayenthiran/events{/privacy}","received_events_url":"https://api.github.com/users/Vijayenthiran/received_events","type":"User","site_admin":false},"created_at":"2016-07-09T15:46:47Z","updated_at":"2016-07-09T15:46:47Z","body":"@martinwicke Pardon my daftness, `classifier.fit()` doesn't seems to accept `max_steps` are parameter. Can you provide an example?"}}
{"actor":{"display_login":"Vijayenthiran"}}