{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/5325","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/5325/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/5325/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/5325/events","html_url":"https://github.com/fchollet/keras/issues/5325","id":206198509,"number":5325,"title":"Convert tensorflow tensor to Keras tensor","user":{"login":"sanjeevmk","id":1523786,"avatar_url":"https://avatars2.githubusercontent.com/u/1523786?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjeevmk","html_url":"https://github.com/sanjeevmk","followers_url":"https://api.github.com/users/sanjeevmk/followers","following_url":"https://api.github.com/users/sanjeevmk/following{/other_user}","gists_url":"https://api.github.com/users/sanjeevmk/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjeevmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjeevmk/subscriptions","organizations_url":"https://api.github.com/users/sanjeevmk/orgs","repos_url":"https://api.github.com/users/sanjeevmk/repos","events_url":"https://api.github.com/users/sanjeevmk/events{/privacy}","received_events_url":"https://api.github.com/users/sanjeevmk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-02-08T13:30:56Z","updated_at":"2017-06-10T04:45:21Z","closed_at":null,"body":"I have a trained tensorflow model that I've loaded using the checkpoint and meta files. The model loads properly. But now I'd like to work with the same model using Keras, instead of direct tensorflow. \r\n\r\nI got the input and output tensor of the loaded model:\r\n```\r\nimages_placeholder = tf.get_default_graph().get_tensor_by_name(\"input:0\")\r\nembeddings = tf.get_default_graph().get_tensor_by_name(\"embeddings:0\")\r\n```\r\n\r\nNow I want to create a Keras model with these, so I tried this:\r\n`model = Model(images_placeholder,embeddings)`\r\n\r\nThis however, gives me this error:\r\n`TypeError: Input tensors to a Model must be Keras tensors. Found: Tensor(\"input:0\", shape=(?, 160, 160, 3), dtype=float32) (missing Keras metadata).\r\n`\r\nAny ideas on how to fix this? I also don't know the architecture of this model, so I wanted to do model.summary() after the keras model is loaded. I thought Keras worked seamlessly with Tensorflow and Theano graphs..\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/307542271","html_url":"https://github.com/fchollet/keras/issues/5325#issuecomment-307542271","issue_url":"https://api.github.com/repos/fchollet/keras/issues/5325","id":307542271,"user":{"login":"mddrill","id":20046178,"avatar_url":"https://avatars2.githubusercontent.com/u/20046178?v=3","gravatar_id":"","url":"https://api.github.com/users/mddrill","html_url":"https://github.com/mddrill","followers_url":"https://api.github.com/users/mddrill/followers","following_url":"https://api.github.com/users/mddrill/following{/other_user}","gists_url":"https://api.github.com/users/mddrill/gists{/gist_id}","starred_url":"https://api.github.com/users/mddrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mddrill/subscriptions","organizations_url":"https://api.github.com/users/mddrill/orgs","repos_url":"https://api.github.com/users/mddrill/repos","events_url":"https://api.github.com/users/mddrill/events{/privacy}","received_events_url":"https://api.github.com/users/mddrill/received_events","type":"User","site_admin":false},"created_at":"2017-06-10T04:45:21Z","updated_at":"2017-06-10T04:45:21Z","body":"@ahundt So there's no way to do this without rewriting the whole model in keras? (It's kind of a complex model, so this wouldn't be trivial)"}}
{"actor":{"display_login":"mddrill"}}