{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/2756","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/2756/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/2756/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/2756/events","html_url":"https://github.com/fchollet/keras/issues/2756","id":155666516,"number":2756,"title":"fit_generator threw an exception.","user":{"login":"dsy412610","id":17562872,"avatar_url":"https://avatars.githubusercontent.com/u/17562872?v=3","gravatar_id":"","url":"https://api.github.com/users/dsy412610","html_url":"https://github.com/dsy412610","followers_url":"https://api.github.com/users/dsy412610/followers","following_url":"https://api.github.com/users/dsy412610/following{/other_user}","gists_url":"https://api.github.com/users/dsy412610/gists{/gist_id}","starred_url":"https://api.github.com/users/dsy412610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsy412610/subscriptions","organizations_url":"https://api.github.com/users/dsy412610/orgs","repos_url":"https://api.github.com/users/dsy412610/repos","events_url":"https://api.github.com/users/dsy412610/events{/privacy}","received_events_url":"https://api.github.com/users/dsy412610/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-19T06:56:58Z","updated_at":"2016-05-19T13:53:29Z","closed_at":null,"body":"Hi,\r\n    I used fit_generator in my code, but it throw an exception recently as following:\r\n` Traceback (most recent call last):`\r\n`File \"model3.py\", line 149, in <module>`\r\n`    validation_data=(X_test, Y_test))`\r\n`File \"/usr/local/lib/python2.7/dist-packages/keras/models.py\", line 651, in fit_generator`\r\n`max_q_size=max_q_size)`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/keras/engine/training.py\", line 1358, in fit_generator`\r\n`    'or (x, y). Found: ' + str(generator_output))`\r\n`Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None`\r\n`Exception in thread Thread-1:`\r\n`Traceback (most recent call last):`\r\n`  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner`\r\n`    self.run()`\r\n`  File \"/usr/lib/python2.7/threading.py\", line 763, in run`\r\n`    self.__target(*self.__args, **self.__kwargs)`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/keras/engine/training.py\", line 404, in`\r\n`data_generator_task`\r\n`    generator_output = next(generator)`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/keras/preprocessing/image.py\", line 302, in next`\r\n`    x = self.random_transform(x.astype('float32'))`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/keras/preprocessing/image.py\", line 387, in `\r\n`random_transform`\r\n`    fill_mode=self.fill_mode, cval=self.cval)`\r\n`  File \"/usr/local/lib/python2.7/dist-packages/keras/preprocessing/image.py\", line 106, in `\r\n`apply_transform`\r\n`    x = np.stack(channel_images, axis=0)`\r\n`AttributeError: 'module' object has no attribute 'stack'`\r\n\r\n    It seems that numpy has no attribute stack.  Is there any change in fit_generator? Why can’t I used that as normal? Thanks!"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/220330789","html_url":"https://github.com/fchollet/keras/issues/2756#issuecomment-220330789","issue_url":"https://api.github.com/repos/fchollet/keras/issues/2756","id":220330789,"user":{"login":"dsy412610","id":17562872,"avatar_url":"https://avatars.githubusercontent.com/u/17562872?v=3","gravatar_id":"","url":"https://api.github.com/users/dsy412610","html_url":"https://github.com/dsy412610","followers_url":"https://api.github.com/users/dsy412610/followers","following_url":"https://api.github.com/users/dsy412610/following{/other_user}","gists_url":"https://api.github.com/users/dsy412610/gists{/gist_id}","starred_url":"https://api.github.com/users/dsy412610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsy412610/subscriptions","organizations_url":"https://api.github.com/users/dsy412610/orgs","repos_url":"https://api.github.com/users/dsy412610/repos","events_url":"https://api.github.com/users/dsy412610/events{/privacy}","received_events_url":"https://api.github.com/users/dsy412610/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T13:53:29Z","updated_at":"2016-05-19T13:53:29Z","body":"Well, I used numpy version 1.8.2. But I dont't know why fit_generator worked normally before for I didn't update numpy."}}