{"action":"closed","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3895","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3895/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3895/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3895/events","html_url":"https://github.com/tensorflow/tensorflow/issues/3895","id":171843362,"number":3895,"title":"MultiRNNCell with state_is_tuple=True got Error!","user":{"login":"xinyuwuhenZZ","id":7837436,"avatar_url":"https://avatars.githubusercontent.com/u/7837436?v=3","gravatar_id":"","url":"https://api.github.com/users/xinyuwuhenZZ","html_url":"https://github.com/xinyuwuhenZZ","followers_url":"https://api.github.com/users/xinyuwuhenZZ/followers","following_url":"https://api.github.com/users/xinyuwuhenZZ/following{/other_user}","gists_url":"https://api.github.com/users/xinyuwuhenZZ/gists{/gist_id}","starred_url":"https://api.github.com/users/xinyuwuhenZZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xinyuwuhenZZ/subscriptions","organizations_url":"https://api.github.com/users/xinyuwuhenZZ/orgs","repos_url":"https://api.github.com/users/xinyuwuhenZZ/repos","events_url":"https://api.github.com/users/xinyuwuhenZZ/events{/privacy}","received_events_url":"https://api.github.com/users/xinyuwuhenZZ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20response","name":"awaiting response","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"ebrevdo","id":1794715,"avatar_url":"https://avatars.githubusercontent.com/u/1794715?v=3","gravatar_id":"","url":"https://api.github.com/users/ebrevdo","html_url":"https://github.com/ebrevdo","followers_url":"https://api.github.com/users/ebrevdo/followers","following_url":"https://api.github.com/users/ebrevdo/following{/other_user}","gists_url":"https://api.github.com/users/ebrevdo/gists{/gist_id}","starred_url":"https://api.github.com/users/ebrevdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebrevdo/subscriptions","organizations_url":"https://api.github.com/users/ebrevdo/orgs","repos_url":"https://api.github.com/users/ebrevdo/repos","events_url":"https://api.github.com/users/ebrevdo/events{/privacy}","received_events_url":"https://api.github.com/users/ebrevdo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ebrevdo","id":1794715,"avatar_url":"https://avatars.githubusercontent.com/u/1794715?v=3","gravatar_id":"","url":"https://api.github.com/users/ebrevdo","html_url":"https://github.com/ebrevdo","followers_url":"https://api.github.com/users/ebrevdo/followers","following_url":"https://api.github.com/users/ebrevdo/following{/other_user}","gists_url":"https://api.github.com/users/ebrevdo/gists{/gist_id}","starred_url":"https://api.github.com/users/ebrevdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebrevdo/subscriptions","organizations_url":"https://api.github.com/users/ebrevdo/orgs","repos_url":"https://api.github.com/users/ebrevdo/repos","events_url":"https://api.github.com/users/ebrevdo/events{/privacy}","received_events_url":"https://api.github.com/users/ebrevdo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-08-18T08:18:16Z","updated_at":"2016-08-23T06:28:33Z","closed_at":"2016-08-23T06:28:33Z","body":"Running MultiRNN, when I set \r\n```\r\ncell = tf.nn.rnn_cell.LSTMCell(state_size, state_is_tuple=True)\r\ncell = tf.nn.rnn_cell.MultiRNNCell([cell] * num_layers, state_is_tuple=True)\r\n```\r\ngot following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/nali/Workspace/tensorflow_example/search_click/RNN/lstm.py\", line 175, in <module>\r\n    train_network(g, 3)\r\n  File \"/Users/nali/Workspace/tensorflow_example/search_click/RNN/lstm.py\", line 140, in train_network\r\n    [g['total_loss'], g['final_state'], g['train_step']], feed_dict)\r\n  File \"/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 372, in run\r\n    run_metadata_ptr)\r\n  File \"/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 584, in _run\r\n    processed_fetches = self._process_fetches(fetches)\r\n  File \"/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py\", line 540, in _process_fetches\r\n    % (subfetch, fetch, type(subfetch), str(e)))\r\nTypeError: Fetch argument (LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_2:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_3:0' shape=(32, 100) dtype=float32>), LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_4:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_5:0' shape=(32, 100) dtype=float32>), LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_6:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_7:0' shape=(32, 100) dtype=float32>)) of (LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_2:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_3:0' shape=(32, 100) dtype=float32>), LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_4:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_5:0' shape=(32, 100) dtype=float32>), LSTMStateTuple(c=<tf.Tensor 'RNN/while/Exit_6:0' shape=(32, 100) dtype=float32>, h=<tf.Tensor 'RNN/while/Exit_7:0' shape=(32, 100) dtype=float32>)) has invalid type <type 'tuple'>, must be a string or Tensor. (Can not convert a tuple into a Tensor or Operation.)\r\n```\r\nBut when I set state_is_tuple=False(Default), it works fine.\r\nHowever, state_is_tuple=True is recommended to faster LSTM states."}}
{"actor":{"display_login":"xinyuwuhenZZ"}}