AssociatingNLCommentCodeEntities
AssociatingNLCommentCodeEntities copied to clipboard
Requirements + sample script for pre-trained model
I would like to thank the authors for this wonderful work.
I am running the commands that exist in the "models/run.sh" file, but I have encountered compatibility errors. Can you tell me please the project requirements (version of : python, tensorflow, keras, ...) ? And a sample script to test the pre-trained model?
Thanks.
I would like to thank the authors for this wonderful work.
I am running the commands that exist in the "models/run.sh" file, but I have encountered compatibility errors. Can you tell me please the project requirements (version of : python, tensorflow, keras, ...) ? And a sample script to test the pre-trained model?
Thanks.
Hi @tmarrakchi,
Thanks for your question. We used Python 2.7.17 and tensorflow_gpu-1.5.0. We do not release pre-trained models; however, you should be able to train and evaluate models using the commands in run.sh. Could you please provide the errors that you are seeing?
Hi @panthap2,
Thanks for your response. I am using :
- Python 2.7.17 and tensorflow_gpu-1.5.0
- tensorflow 2.3.0
- Keras 2.4.3
And this the error that I have : AttributeError: 'module' object has no attribute 'placeholder'.
Note : I'm using a Colab environnment and I enabled the GPU execution type.
Hi @panthap2,
Thanks for your response. I am using :
- Python 2.7.17 and tensorflow_gpu-1.5.0
- tensorflow 2.3.0
- Keras 2.4.3
And this the error that I have : AttributeError: 'module' object has no attribute 'placeholder'.
Note : I'm using a Colab environnment and I enabled the GPU execution type.
I belief "tf.placeholder" was deprecated in later versions of Tensorflow. Can you see if it works if you downgrade to tensorflow 1.5.0?
Hi @panthap2, Thanks for your response. I am using :
- Python 2.7.17 and tensorflow_gpu-1.5.0
- tensorflow 2.3.0
- Keras 2.4.3
And this the error that I have : AttributeError: 'module' object has no attribute 'placeholder'. Note : I'm using a Colab environnment and I enabled the GPU execution type.
I belief "tf.placeholder" was deprecated in later versions of Tensorflow. Can you see if it works if you downgrade to tensorflow 1.5.0?
I tested 1.5.0 version but there is still the same error. I share with you my colab file, if you can please check it and tell me exactly where is the problem.
Colab link : https://colab.research.google.com/drive/1S_rukxsUYYuTaHkZzP1qV1IKsYl7yXvi?usp=sharing#scrollTo=O4vxoj5SmF7Q
Thank you in advance
Hi @panthap2, Thanks for your response. I am using :
- Python 2.7.17 and tensorflow_gpu-1.5.0
- tensorflow 2.3.0
- Keras 2.4.3
And this the error that I have : AttributeError: 'module' object has no attribute 'placeholder'. Note : I'm using a Colab environnment and I enabled the GPU execution type.
I belief "tf.placeholder" was deprecated in later versions of Tensorflow. Can you see if it works if you downgrade to tensorflow 1.5.0?
I tested 1.5.0 version but there is still the same error. I share with you my colab file, if you can please check it and tell me exactly where is the problem.
Colab link : https://colab.research.google.com/drive/1S_rukxsUYYuTaHkZzP1qV1IKsYl7yXvi?usp=sharing#scrollTo=O4vxoj5SmF7Q
Thank you in advance
I briefly looked at your file, specifically at the error:
File "/content/drive/My Drive/Colab Notebooks/AssociatingNLCommentCodeEntities/models/feedforward_nn.py", line 91, in build_network
self.inputs = tf.compat.v1.placeholder(tf.float32, [None, self.num_features])
It looks like you may have made some changes in that function? Line 91 corresponds to a comment in the original feedforward_nn.py
file that I had committed to the repository. Please see: https://github.com/panthap2/AssociatingNLCommentCodeEntities/blob/76f90fa3150c71e84d88ece120af22781149f51c/models/feedforward_nn.py#L92 If you revert your changes, does it fix the issue? If not, could you try doing a simple test of whether the command tf.placeholder
works for you, similar to the following?:
$ python
Python 2.7.17 (default, Jul 20 2020, 15:37:01)
>>> import tensorflow as tf
>>> tf.__version__
'1.5.0'
>>> inputs = tf.placeholder(tf.float32, [None, 10])
>>> inputs
<tf.Tensor 'Placeholder:0' shape=(?, 10) dtype=float32>