tech-srl / code2seq

Code for the model presented in the paper: "code2seq: Generating Sequences from Structured Representations of Code"
http://code2seq.org
MIT License
556 stars 164 forks source link

Model training issue #79

Closed TenzinJinpa2019 closed 3 years ago

TenzinJinpa2019 commented 4 years ago

Hi,

I am trying to train the model using the default model and it seems like model is not taking the GPU (I am using google colab pro ). I am not able to resolved the issue, could you kindly guide me !

Thanks

urialon commented 4 years ago

Hi @TenzinJinpa2019 , Thank you for your interest in code2seq!

I think that you need to choose "GPU" in the "Runtime -> Change Runtime Type" menu in Colab (this is unrelated to code2seq).

Uri

TenzinJinpa2019 commented 4 years ago

Hi @urialon

Thank you for the advice and I did change the runtime to GPU. Also I tried to reduced the batch size.

Current configuration

a) GPU (through Google Colab ) b) Batch size 128 (training) and 64(training)

But google Colab keeping showing me the messages " allocated GPU but not utilizing it " .

however If I run the program without changing the Batch size in TPU it work but I want to use the GPU (hoping that it will be faster ). Is there any other config that I may need to change.

with regards Tenzin Jinpa

urialon commented 3 years ago

Hi @TenzinJinpa2019 , Maybe you did not install the gpu version of TensorFlow 1? What is the installed TensorFlow version?

Try to run in the first cell: !pip install tensorflow-gpu==1.12

Uri

urialon commented 3 years ago

Closing due to inactivity, feel free to re-open if there are any more questions.