{"action":"opened","issue":{"url":"https://api.github.com/repos/farizrahman4u/seq2seq/issues/127","repository_url":"https://api.github.com/repos/farizrahman4u/seq2seq","labels_url":"https://api.github.com/repos/farizrahman4u/seq2seq/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/farizrahman4u/seq2seq/issues/127/comments","events_url":"https://api.github.com/repos/farizrahman4u/seq2seq/issues/127/events","html_url":"https://github.com/farizrahman4u/seq2seq/issues/127","id":187685669,"number":127,"title":"Error on evaluating a model with dropout","user":{"login":"ishalyminov","id":1062768,"avatar_url":"https://avatars.githubusercontent.com/u/1062768?v=3","gravatar_id":"","url":"https://api.github.com/users/ishalyminov","html_url":"https://github.com/ishalyminov","followers_url":"https://api.github.com/users/ishalyminov/followers","following_url":"https://api.github.com/users/ishalyminov/following{/other_user}","gists_url":"https://api.github.com/users/ishalyminov/gists{/gist_id}","starred_url":"https://api.github.com/users/ishalyminov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishalyminov/subscriptions","organizations_url":"https://api.github.com/users/ishalyminov/orgs","repos_url":"https://api.github.com/users/ishalyminov/repos","events_url":"https://api.github.com/users/ishalyminov/events{/privacy}","received_events_url":"https://api.github.com/users/ishalyminov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T11:17:22Z","updated_at":"2016-11-07T11:17:22Z","closed_at":null,"body":"Here's some code just as in tests but with the evaluation step:\r\n\r\n```\r\nimport numpy as np\r\n\r\nfrom seq2seq.models import AttentionSeq2Seq\r\n\r\ninput_length = 10\r\ninput_dim = 2\r\n\r\noutput_length = 8\r\noutput_dim = 3\r\n\r\nsamples = 100\r\n\r\nx = np.random.random((samples, input_length, input_dim))\r\ny = np.random.random((samples, output_length, output_dim))\r\na = np.random.random((samples, input_length, input_dim))\r\nb = np.random.random((samples, output_length, output_dim))\r\n\r\nmodel = AttentionSeq2Seq(output_dim=output_dim, output_length=output_length, input_shape=(input_length, input_dim), dropout=0.1)\r\nmodel.compile(loss='mse', optimizer='sgd')\r\nmodel.fit(x, y, nb_epoch=1)\r\nmodel.evaluate(a, b)\r\n```\r\n\r\nThe evaluate step raises the following exception:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 21, in <module>\r\n    model.evaluate(a, b)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/keras/engine/training.py\", line 1139, in evaluate\r\n    self._make_test_function()\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/keras/engine/training.py\", line 718, in _make_test_function\r\n    **self._function_kwargs)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/keras/backend/theano_backend.py\", line 727, in function\r\n    return Function(inputs, outputs, updates=updates, **kwargs)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/keras/backend/theano_backend.py\", line 713, in __init__\r\n    **kwargs)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/compile/function.py\", line 320, in function\r\n    output_keys=output_keys)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/compile/pfunc.py\", line 479, in pfunc\r\n    output_keys=output_keys)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/compile/function_module.py\", line 1776, in orig_function\r\n    output_keys=output_keys).create(\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/compile/function_module.py\", line 1428, in __init__\r\n    accept_inplace)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/compile/function_module.py\", line 177, in std_fgraph\r\n    update_mapping=update_mapping)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/gof/fg.py\", line 171, in __init__\r\n    self.__import_r__(output, reason=\"init\")\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/gof/fg.py\", line 360, in __import_r__\r\n    self.__import__(variable.owner, reason=reason)\r\n  File \"/home/is33/Envs/alexa_seq2seq/lib/python2.7/site-packages/theano/gof/fg.py\", line 474, in __import__\r\n    r)\r\ntheano.gof.fg.MissingInputError: (\"An input of the graph, used to compute Shape(<TensorType(float32, 3D)>), was not provided and not given a value.Use the Theano flag exception_verbosity='high',for more information on this error.\", <TensorType(float32, 3D)>)\r\n```\r\n\r\nHowever, if you initialize AttensionSeq2Seq with `dropout=0.0`, everything works fine."}}
{"actor":{"display_login":"ishalyminov"}}