payload: {"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/34004","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/34004/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/34004/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/34004/events","html_url":"https://github.com/tensorflow/tensorflow/issues/34004","id":517681659,"node_id":"MDU6SXNzdWU1MTc2ODE2NTk=","number":34004,"title":"tf.keras.layers.SimpleRNN doesn't use GPU?","user":{"login":"airplane2230","id":33315343,"node_id":"MDQ6VXNlcjMzMzE1MzQz","avatar_url":"https://avatars2.githubusercontent.com/u/33315343?v=4","gravatar_id":"","url":"https://api.github.com/users/airplane2230","html_url":"https://github.com/airplane2230","followers_url":"https://api.github.com/users/airplane2230/followers","following_url":"https://api.github.com/users/airplane2230/following{/other_user}","gists_url":"https://api.github.com/users/airplane2230/gists{/gist_id}","starred_url":"https://api.github.com/users/airplane2230/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airplane2230/subscriptions","organizations_url":"https://api.github.com/users/airplane2230/orgs","repos_url":"https://api.github.com/users/airplane2230/repos","events_url":"https://api.github.com/users/airplane2230/events{/privacy}","received_events_url":"https://api.github.com/users/airplane2230/received_events","type":"User","site_admin":false},"labels":[{"id":1160540362,"node_id":"MDU6TGFiZWwxMTYwNTQwMzYy","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.0","name":"TF 2.0","color":"e79b38","default":false,"description":"Issues relating to TensorFlow 2.0"},{"id":1097547538,"node_id":"MDU6TGFiZWwxMDk3NTQ3NTM4","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/comp:gpu","name":"comp:gpu","color":"0052cc","default":false,"description":""},{"id":1097546578,"node_id":"MDU6TGFiZWwxMDk3NTQ2NTc4","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/comp:keras","name":"comp:keras","color":"0052cc","default":false,"description":""},{"id":473172988,"node_id":"MDU6TGFiZWw0NzMxNzI5ODg=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug","name":"type:bug","color":"159b2e","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"sanjoy","id":136291,"node_id":"MDQ6VXNlcjEzNjI5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/136291?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjoy","html_url":"https://github.com/sanjoy","followers_url":"https://api.github.com/users/sanjoy/followers","following_url":"https://api.github.com/users/sanjoy/following{/other_user}","gists_url":"https://api.github.com/users/sanjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjoy/subscriptions","organizations_url":"https://api.github.com/users/sanjoy/orgs","repos_url":"https://api.github.com/users/sanjoy/repos","events_url":"https://api.github.com/users/sanjoy/events{/privacy}","received_events_url":"https://api.github.com/users/sanjoy/received_events","type":"User","site_admin":false},"assignees":[{"login":"sanjoy","id":136291,"node_id":"MDQ6VXNlcjEzNjI5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/136291?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjoy","html_url":"https://github.com/sanjoy","followers_url":"https://api.github.com/users/sanjoy/followers","following_url":"https://api.github.com/users/sanjoy/following{/other_user}","gists_url":"https://api.github.com/users/sanjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjoy/subscriptions","organizations_url":"https://api.github.com/users/sanjoy/orgs","repos_url":"https://api.github.com/users/sanjoy/repos","events_url":"https://api.github.com/users/sanjoy/events{/privacy}","received_events_url":"https://api.github.com/users/sanjoy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2019-11-05T10:24:46Z","updated_at":"2019-12-17T01:01:13Z","closed_at":null,"author_association":"NONE","body":"First, This is a example in TensorFlow 2.0 with Keras.\r\n\r\n```\r\nfrom tensorflow.keras.datasets import imdb\r\n\r\nnum_words = 10000\r\n(X_train, y_train), (X_test, y_test) = imdb.load_data(num_words=num_words)\r\n\r\nfrom tensorflow.keras.preprocessing.sequence import pad_sequences\r\n\r\nmax_len = 500\r\n\r\npad_X_train = pad_sequences(X_train, maxlen=max_len)\r\npad_X_test = pad_sequences(X_test, maxlen=max_len)\r\n\r\nfrom tensorflow.keras.models import Sequential\r\nfrom tensorflow.keras.layers import SimpleRNN, Dense, Embedding  \r\n\r\nmodel = Sequential()\r\nmodel.add(Embedding(input_dim = num_words, output_dim = 32))\r\nmodel.add(SimpleRNN(32, return_sequences = True, dropout = 0.15, recurrent_dropout = 0.15))\r\nmodel.add(SimpleRNN(32))\r\nmodel.add(Dense(1, activation = 'sigmoid'))\r\n\r\nmodel.compile(optimizer='adam',\r\n             loss = 'binary_crossentropy',\r\n             metrics = ['acc'])\r\n\r\n# model.summary()\r\n\r\nhistory = model.fit(pad_X_train, y_train, \r\n                    batch_size = 32, epochs = 15, \r\n                    validation_split = 0.2)\r\n```\r\n\r\n+ Use Window 10 and TF 2.0\r\n+ NVidia Driver : 418.81\r\n+ CUDA : 10.1\r\n+ GPU : GeForce GTX 1050\r\n\r\nAnd, When I use the layer SimpleRNN in keras, GPU-Utils is very low. what happen??\r\n![image](https://user-images.githubusercontent.com/33315343/68199250-04940c00-0001-11ea-9b53-b315e6ff8505.png)\r\n\r\nFor checking if my GPU worked correctly, I use it using Conv2D.\r\n![image](https://user-images.githubusercontent.com/33315343/68199475-753b2880-0001-11ea-90be-bae41dc5d637.png)\r\n\r\nThe above picture was run on the MNIST dataset, which does not seem to require much GPU-Utils.\r\n\r\nI haven't seen 100% use, but my GPU seems to work fine.\r\n\r\nStacking multiple SimpleRNN layers or using just one will not increase GPU-Utils at 10%. \r\nWhat's wrong?\r\n\r\nIs it because of the feature of the layer?"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/566322467","html_url":"https://github.com/tensorflow/tensorflow/issues/34004#issuecomment-566322467","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/34004","id":566322467,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NjMyMjQ2Nw==","user":{"login":"sanjoy","id":136291,"node_id":"MDQ6VXNlcjEzNjI5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/136291?v=4","gravatar_id":"","url":"https://api.github.com/users/sanjoy","html_url":"https://github.com/sanjoy","followers_url":"https://api.github.com/users/sanjoy/followers","following_url":"https://api.github.com/users/sanjoy/following{/other_user}","gists_url":"https://api.github.com/users/sanjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjoy/subscriptions","organizations_url":"https://api.github.com/users/sanjoy/orgs","repos_url":"https://api.github.com/users/sanjoy/repos","events_url":"https://api.github.com/users/sanjoy/events{/privacy}","received_events_url":"https://api.github.com/users/sanjoy/received_events","type":"User","site_admin":false},"created_at":"2019-12-17T01:01:13Z","updated_at":"2019-12-17T01:01:13Z","author_association":"MEMBER","body":"By \"logs\" I meant the entire output of the TF program.\r\n\r\nHowever, re-reading the bug report, I don't think the logs will be super useful.  In your case the TF program _is using_ the GPU, just not as much you'd expect, right?\r\n\r\nThis sort of thing is very hard to debug over email, I'd suggest using the [trace viewer](https://www.tensorflow.org/tensorboard/tensorboard_profiling_keras#trace_viewer) to see if you can spot any red flags."}}
other: {"actor":{"display_login":"sanjoy"}}