{"action":"created","issue":{"url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/36","repository_url":"https://api.github.com/repos/zsdonghao/tensorlayer","labels_url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/36/comments","events_url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/36/events","html_url":"https://github.com/zsdonghao/tensorlayer/issues/36","id":195191279,"number":36,"title":"Apply activation function to RNN output","user":{"login":"lucidfrontier45","id":655305,"avatar_url":"https://avatars.githubusercontent.com/u/655305?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidfrontier45","html_url":"https://github.com/lucidfrontier45","followers_url":"https://api.github.com/users/lucidfrontier45/followers","following_url":"https://api.github.com/users/lucidfrontier45/following{/other_user}","gists_url":"https://api.github.com/users/lucidfrontier45/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidfrontier45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidfrontier45/subscriptions","organizations_url":"https://api.github.com/users/lucidfrontier45/orgs","repos_url":"https://api.github.com/users/lucidfrontier45/repos","events_url":"https://api.github.com/users/lucidfrontier45/events{/privacy}","received_events_url":"https://api.github.com/users/lucidfrontier45/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T08:35:08Z","updated_at":"2016-12-13T09:03:54Z","closed_at":null,"body":"Hi all.\r\n\r\nI want to apply activation function to the output of RNNLayer.\r\nHowever the `RNNLayer` has no `act` argument as `DenseLayer` or Convolution layers have.\r\n\r\n```python\r\nclass tensorlayer.layers.RNNLayer(layer=None, cell_fn=<class 'tensorflow.python.ops.rnn_cell.BasicRNNCell'>, cell_init_args={}, n_hidden=100, initializer=<function _initializer>, n_steps=5, initial_state=None, return_last=False, return_seq_2d=False, name='rnn_layer')\r\n```\r\n\r\nI currently use the `LambdaLayer` to apply activation as follows. \r\n\r\n```python\r\nnet = tl.layers.RNNLayer(net, ...)\r\nnet = tl.layers.LambdaLayer(net, lambda x: act_fn(x))\r\n```\r\n\r\nwhere `act_fn` is a function such as `tf.nn.relu`.\r\n\r\nIs it correct usage or is there any other way? \r\n\r\nThank you. "},"comment":{"url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/comments/266683528","html_url":"https://github.com/zsdonghao/tensorlayer/issues/36#issuecomment-266683528","issue_url":"https://api.github.com/repos/zsdonghao/tensorlayer/issues/36","id":266683528,"user":{"login":"lucidfrontier45","id":655305,"avatar_url":"https://avatars.githubusercontent.com/u/655305?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidfrontier45","html_url":"https://github.com/lucidfrontier45","followers_url":"https://api.github.com/users/lucidfrontier45/followers","following_url":"https://api.github.com/users/lucidfrontier45/following{/other_user}","gists_url":"https://api.github.com/users/lucidfrontier45/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidfrontier45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidfrontier45/subscriptions","organizations_url":"https://api.github.com/users/lucidfrontier45/orgs","repos_url":"https://api.github.com/users/lucidfrontier45/repos","events_url":"https://api.github.com/users/lucidfrontier45/events{/privacy}","received_events_url":"https://api.github.com/users/lucidfrontier45/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T09:03:54Z","updated_at":"2016-12-13T09:03:54Z","body":"@zsdonghao \r\n\r\nThank you. \r\n\r\nI think `act` should be included in `RNNLayer` so that the API is consistent to other Layers like Dense or Convolution.\r\n \r\nWill `RNNLayer` be modified to have `act` in the future? \r\n"}}
{"actor":{"display_login":"lucidfrontier45"}}