{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/4358","repository_url":"https://api.github.com/repos/Theano/Theano","labels_url":"https://api.github.com/repos/Theano/Theano/issues/4358/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/4358/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/4358/events","html_url":"https://github.com/Theano/Theano/issues/4358","id":147376965,"number":4358,"title":"PersistentNdarrayLoad in pkl_utils.py doesn't process same object properly","user":{"login":"tete1030","id":4312115,"avatar_url":"https://avatars.githubusercontent.com/u/4312115?v=3","gravatar_id":"","url":"https://api.github.com/users/tete1030","html_url":"https://github.com/tete1030","followers_url":"https://api.github.com/users/tete1030/followers","following_url":"https://api.github.com/users/tete1030/following{/other_user}","gists_url":"https://api.github.com/users/tete1030/gists{/gist_id}","starred_url":"https://api.github.com/users/tete1030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tete1030/subscriptions","organizations_url":"https://api.github.com/users/tete1030/orgs","repos_url":"https://api.github.com/users/tete1030/repos","events_url":"https://api.github.com/users/tete1030/events{/privacy}","received_events_url":"https://api.github.com/users/tete1030/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-11T10:01:53Z","updated_at":"2016-04-12T11:07:51Z","closed_at":null,"body":"As mentioned in #4238 and mila-udem/blocks#1031  , I encountered the same problem when I use function __theano.misc.pkl_utils.load__ with default __persistent\\_id__ parameter, __PersistentNdarrayLoad__.\r\n\r\nIf __PersistentNdarrayLoad.\\_\\_call\\_\\___ receives two same __persid__, it will return two different objects with same value instead of one single object, which causes __AssertionError__ in __\\_constructor\\_Function__ of __theano.compile.function\\_module__.\r\n\r\nThe issues of _blocks_ mentioned above have been fixed by caching created object as https://github.com/mila-udem/blocks/pull/1032/commits/5c04f77b71a7c95182645e1cfa20299fb883f802\r\n\r\nBesides, there is a little problem at https://github.com/Theano/Theano/blob/master/theano/compile/sharedvalue.py#L79\r\n**container** should be **value**, **container** has already been checked.\r\n\r\nAnd I found in https://github.com/Theano/Theano/blob/master/theano/misc/pkl_utils.py#L263\r\nWhy is it storing object name with key __id(obj.container.storage[0])__ but retrieving object name with key __id(obj)__ in __\\_resolve\\_name__ ? I'm not sure if it is correct.\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/208849467","html_url":"https://github.com/Theano/Theano/issues/4358#issuecomment-208849467","issue_url":"https://api.github.com/repos/Theano/Theano/issues/4358","id":208849467,"user":{"login":"tete1030","id":4312115,"avatar_url":"https://avatars.githubusercontent.com/u/4312115?v=3","gravatar_id":"","url":"https://api.github.com/users/tete1030","html_url":"https://github.com/tete1030","followers_url":"https://api.github.com/users/tete1030/followers","following_url":"https://api.github.com/users/tete1030/following{/other_user}","gists_url":"https://api.github.com/users/tete1030/gists{/gist_id}","starred_url":"https://api.github.com/users/tete1030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tete1030/subscriptions","organizations_url":"https://api.github.com/users/tete1030/orgs","repos_url":"https://api.github.com/users/tete1030/repos","events_url":"https://api.github.com/users/tete1030/events{/privacy}","received_events_url":"https://api.github.com/users/tete1030/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T11:07:51Z","updated_at":"2016-04-12T11:07:51Z","body":"I was wrong about the code at Line 79 in _sharedvalue.py_. It seems like a duplicate check of **container**."}}