{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/6815","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/6815/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/6815/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/6815/events","html_url":"https://github.com/fchollet/keras/issues/6815","id":232769266,"number":6815,"title":"tf.contrib lookup table issues with Keras Lambda layer","user":{"login":"viksit","id":198669,"avatar_url":"https://avatars2.githubusercontent.com/u/198669?v=3","gravatar_id":"","url":"https://api.github.com/users/viksit","html_url":"https://github.com/viksit","followers_url":"https://api.github.com/users/viksit/followers","following_url":"https://api.github.com/users/viksit/following{/other_user}","gists_url":"https://api.github.com/users/viksit/gists{/gist_id}","starred_url":"https://api.github.com/users/viksit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viksit/subscriptions","organizations_url":"https://api.github.com/users/viksit/orgs","repos_url":"https://api.github.com/users/viksit/repos","events_url":"https://api.github.com/users/viksit/events{/privacy}","received_events_url":"https://api.github.com/users/viksit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-01T05:26:02Z","updated_at":"2017-06-01T07:08:47Z","closed_at":null,"body":"@fchollet when doing as recommended in https://github.com/tensorflow/tensorflow/issues/8617, I'm running into the following issue,\r\n\r\n```\r\nIn [88]: keys\r\nOut[88]:\r\n['a',\r\n 'lovely',\r\n 'sentence',\r\n 'this',\r\n 'is',\r\n 'how',\r\n 'are',\r\n 'you',\r\n 'flowers',\r\n 'hello']\r\n\r\nIn [89]: values\r\nOut[89]: [2, 9, 4, 5, 6, 7, 1, 8, 3, 10]\r\n\r\norig_input = Input(shape=(15,), dtype=\"string\")\r\nlookup_table_op = tf.contrib.lookup.HashTable(\r\n                tf.contrib.lookup.KeyValueTensorInitializer(\r\n                    keys,\r\n                    values\r\n                ),\r\n                default_value=-1\r\n            )\r\nlut_output = Lambda(lookup_table_op.lookup)(orig_input)\r\n\r\n\r\nTypeError: Signature mismatch. Keys must be dtype <dtype: 'string'>, got <dtype: 'float32'>.\r\n```\r\n\r\nAny ideas on what could be happening here?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/305408146","html_url":"https://github.com/fchollet/keras/issues/6815#issuecomment-305408146","issue_url":"https://api.github.com/repos/fchollet/keras/issues/6815","id":305408146,"user":{"login":"viksit","id":198669,"avatar_url":"https://avatars2.githubusercontent.com/u/198669?v=3","gravatar_id":"","url":"https://api.github.com/users/viksit","html_url":"https://github.com/viksit","followers_url":"https://api.github.com/users/viksit/followers","following_url":"https://api.github.com/users/viksit/following{/other_user}","gists_url":"https://api.github.com/users/viksit/gists{/gist_id}","starred_url":"https://api.github.com/users/viksit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viksit/subscriptions","organizations_url":"https://api.github.com/users/viksit/orgs","repos_url":"https://api.github.com/users/viksit/repos","events_url":"https://api.github.com/users/viksit/events{/privacy}","received_events_url":"https://api.github.com/users/viksit/received_events","type":"User","site_admin":false},"created_at":"2017-06-01T07:08:47Z","updated_at":"2017-06-01T07:08:47Z","body":"Also, that particular lookup table works in a regular tf context but not within a keras lambda function."}}
{"actor":{"display_login":"viksit"}}