{"action":"opened","issue":{"url":"https://api.github.com/repos/sharadmv/deepx/issues/26","repository_url":"https://api.github.com/repos/sharadmv/deepx","labels_url":"https://api.github.com/repos/sharadmv/deepx/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/sharadmv/deepx/issues/26/comments","events_url":"https://api.github.com/repos/sharadmv/deepx/issues/26/events","html_url":"https://github.com/sharadmv/deepx/issues/26","id":144719909,"number":26,"title":"Issue Setting States for a CompositeNode with Dropout","user":{"login":"liamb315","id":1130820,"avatar_url":"https://avatars.githubusercontent.com/u/1130820?v=3","gravatar_id":"","url":"https://api.github.com/users/liamb315","html_url":"https://github.com/liamb315","followers_url":"https://api.github.com/users/liamb315/followers","following_url":"https://api.github.com/users/liamb315/following{/other_user}","gists_url":"https://api.github.com/users/liamb315/gists{/gist_id}","starred_url":"https://api.github.com/users/liamb315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamb315/subscriptions","organizations_url":"https://api.github.com/users/liamb315/orgs","repos_url":"https://api.github.com/users/liamb315/repos","events_url":"https://api.github.com/users/liamb315/events{/privacy}","received_events_url":"https://api.github.com/users/liamb315/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-30T21:05:33Z","updated_at":"2016-03-30T21:05:33Z","closed_at":null,"body":"There seems to be an issue setting the state of a CompositeNode when there is Dropout.  For instance, previously I would save the parameters of a discriminator model defined as,\r\n\r\n`discriminator = Sequence(Vector(len(text_encoding), batch_size=100)) >> Repeat(dropout_lstm, 2) >> Softmax(2)`\r\n\r\nAnd then load them into a discriminator defined as,\r\n\r\n`discriminator = Sequence(Vector(len(text_encoding_D))) >> (Repeat(LSTM(1024), 2) >> Softmax(2))`\r\n\r\n(Notice the extra parenthesis which was used for when constructing the gan model).  However, when I do an identical procedure \r\n\r\n`discriminator = Sequence(Vector(len(text_encoding_D))) >> (Repeat(LSTM(1024) >> Dropout(0.5), 2) >> Softmax(2))\r\n`\r\n\r\nThis fails with error message seen below.\r\n\r\n\r\n**Error Message**\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n/usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)\r\n    202             else:\r\n    203                 filename = fname\r\n--> 204             __builtin__.execfile(filename, *where)\r\n\r\n/home/wfedus/projects/CharacterGAN/gan.py in <module>()\r\n    128     # with open('models/discriminative/discriminative-model-3.0.1.pkl', 'rb') as fp:\r\n    129     with open('models/discriminative/discriminative-dropout-model-0.0.1_lr0.001.pkl', 'rb') as fp:\r\n--> 130         discriminator.set_state(pickle.load(fp))\r\n    131 \r\n    132 \r\n\r\n/home/wfedus/projects/deepx/deepx/node/node.pyc in set_state(self, state)\r\n    453     def set_state(self, state):\r\n    454         left_state, right_state = state\r\n--> 455         self.left.set_state(left_state)\r\n    456         self.right.set_state(right_state)\r\n    457 \r\n\r\n/home/wfedus/projects/deepx/deepx/node/node.pyc in set_state(self, state)\r\n    205     def set_state(self, state):\r\n    206         assert self.is_initialized(), \"Cannot set state of uninitialized node.\"\r\n--> 207         for name, val in state.items():\r\n    208             T.set_value(self.parameters[name], val)\r\n    209 \r\n\r\nAttributeError: 'tuple' object has no attribute 'items'"}}