{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22952","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22952/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22952/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22952/events","html_url":"https://github.com/tensorflow/tensorflow/issues/22952","id":369704787,"node_id":"MDU6SXNzdWUzNjk3MDQ3ODc=","number":22952,"title":"[tf.keras] Release 1.12.0rc0 issue in model.predict_generator","user":{"login":"brge17","id":33430930,"node_id":"MDQ6VXNlcjMzNDMwOTMw","avatar_url":"https://avatars3.githubusercontent.com/u/33430930?v=4","gravatar_id":"","url":"https://api.github.com/users/brge17","html_url":"https://github.com/brge17","followers_url":"https://api.github.com/users/brge17/followers","following_url":"https://api.github.com/users/brge17/following{/other_user}","gists_url":"https://api.github.com/users/brge17/gists{/gist_id}","starred_url":"https://api.github.com/users/brge17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brge17/subscriptions","organizations_url":"https://api.github.com/users/brge17/orgs","repos_url":"https://api.github.com/users/brge17/repos","events_url":"https://api.github.com/users/brge17/events{/privacy}","received_events_url":"https://api.github.com/users/brge17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wt-huang","id":42785337,"node_id":"MDQ6VXNlcjQyNzg1MzM3","avatar_url":"https://avatars0.githubusercontent.com/u/42785337?v=4","gravatar_id":"","url":"https://api.github.com/users/wt-huang","html_url":"https://github.com/wt-huang","followers_url":"https://api.github.com/users/wt-huang/followers","following_url":"https://api.github.com/users/wt-huang/following{/other_user}","gists_url":"https://api.github.com/users/wt-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/wt-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wt-huang/subscriptions","organizations_url":"https://api.github.com/users/wt-huang/orgs","repos_url":"https://api.github.com/users/wt-huang/repos","events_url":"https://api.github.com/users/wt-huang/events{/privacy}","received_events_url":"https://api.github.com/users/wt-huang/received_events","type":"User","site_admin":false},"assignees":[{"login":"wt-huang","id":42785337,"node_id":"MDQ6VXNlcjQyNzg1MzM3","avatar_url":"https://avatars0.githubusercontent.com/u/42785337?v=4","gravatar_id":"","url":"https://api.github.com/users/wt-huang","html_url":"https://github.com/wt-huang","followers_url":"https://api.github.com/users/wt-huang/followers","following_url":"https://api.github.com/users/wt-huang/following{/other_user}","gists_url":"https://api.github.com/users/wt-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/wt-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wt-huang/subscriptions","organizations_url":"https://api.github.com/users/wt-huang/orgs","repos_url":"https://api.github.com/users/wt-huang/repos","events_url":"https://api.github.com/users/wt-huang/events{/privacy}","received_events_url":"https://api.github.com/users/wt-huang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-10-12T20:47:33Z","updated_at":"2018-10-19T17:04:33Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: Yes\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: 16.04\r\n- **Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device**: na\r\n- **TensorFlow installed from (source or binary)**: source\r\n- **TensorFlow version (use command below)**: 1.12.0rc0\r\n- **Python version**: 3.6\r\n- **Bazel version (if compiling from source)**: na\r\n- **GCC/Compiler version (if compiling from source)**: na\r\n- **CUDA/cuDNN version**: na\r\n- **GPU model and memory**: na\r\n- **Exact command to reproduce**: na\r\n\r\n### Describe the problem\r\nCalling ```model.predict_generator()``` on a loaded model or an uncompiled model produces an error. This does not happen for ``model.predict`` or previous releases of TensorFlow.\r\n\r\n### Source code / logs\r\n```python\r\nimport numpy as np\r\nimport tensorflow as tf\r\n\r\n\r\ndef create_model():\r\n    inputs = tf.keras.layers.Input(shape=(1,))\r\n    outputs = tf.keras.layers.Dense(1)(inputs)\r\n    model = tf.keras.models.Model(inputs=inputs, outputs=outputs)\r\n    return model\r\n\r\n\r\nmodel = create_model()\r\n\r\nX = np.array([[1]])\r\nprint(model.predict(X))\r\n\r\nclass gen(object):\r\n    \"\"\" Dummy data generator. \"\"\"\r\n\r\n    def run(self):\r\n        while True:\r\n            yield np.array([[1]])\r\n\r\nprint(model.predict_generator(generator=gen().run(), steps=1))\r\n```\r\n\r\n```python\r\nline 23, in <module>\r\n    print(model.predict_generator(generator=gen().run(), steps=1))\r\n  File \"/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py\", line 2298, in predict_generator\r\n    verbose=verbose)\r\n  File \"/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_generator.py\", line 354, in predict_generator\r\n    model._make_test_function()\r\n  File \"/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py\", line 716, in _make_test_function\r\n    raise RuntimeError('You must compile your model before using it.')\r\n```"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/431431301","html_url":"https://github.com/tensorflow/tensorflow/issues/22952#issuecomment-431431301","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22952","id":431431301,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQzMTMwMQ==","user":{"login":"brge17","id":33430930,"node_id":"MDQ6VXNlcjMzNDMwOTMw","avatar_url":"https://avatars3.githubusercontent.com/u/33430930?v=4","gravatar_id":"","url":"https://api.github.com/users/brge17","html_url":"https://github.com/brge17","followers_url":"https://api.github.com/users/brge17/followers","following_url":"https://api.github.com/users/brge17/following{/other_user}","gists_url":"https://api.github.com/users/brge17/gists{/gist_id}","starred_url":"https://api.github.com/users/brge17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brge17/subscriptions","organizations_url":"https://api.github.com/users/brge17/orgs","repos_url":"https://api.github.com/users/brge17/repos","events_url":"https://api.github.com/users/brge17/events{/privacy}","received_events_url":"https://api.github.com/users/brge17/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T17:04:33Z","updated_at":"2018-10-19T17:04:33Z","author_association":"NONE","body":"@raymond-yuan or @pavithrasv could one of you two maybe take a look.\r\n\r\nI do not want to have to re-compile the optimizer, metrics, etc... at predict time to upgrade to TensorFlow ``1.12.0``"}}
{"actor":{"display_login":"brge17"}}