-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: add_weight() got multiple values for argument 'name' #54
Comments
Jap, turns out a downgrade to the requirements.txt did the trick. |
Hey tnhaider..what exactly did you downgrade in requirements.txt as I am getting the exactly same error |
Hi, I think I downgraded tensorflow.
From: Gourav Agrwal [mailto:[email protected]]
Sent: Monday, March 23, 2020 8:35 PM
To: UKPLab/emnlp2017-bilstm-cnn-crf <[email protected]>
Cc: Haider, Thomas <[email protected]>; Author <[email protected]>
Subject: Re: [UKPLab/emnlp2017-bilstm-cnn-crf] TypeError: add_weight() got multiple values for argument 'name' (#54)
Hey tnhaider..what exactly did you downgrade in requirements.txt as I am getting the exactly same error
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#54 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AG2OBLTUHDOFQ7JDTBHDFCTRI62XTANCNFSM4JV37OQA>.
|
You just have to install the requirements. |
This solves it without downgrading package versions: EMBEDDIA/bert-bilstm-cnn-crf-ner#1 |
Hi there,
No matter which script I run, I get the same error in ChainCRF, i.e.,
Traceback (most recent call last): File "Train_POS.py", line 69, in <module> model.fit(epochs=25) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py", line 381, in fit self.buildModel() File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py", line 210, in buildModel output = crf(output) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/python36-venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper return func(*args, **kwargs) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/python36-venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 463, in __call__ self.build(unpack_singleton(input_shapes)) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py", line 317, in build constraint=self.U_constraint) TypeError: add_weight() got multiple values for argument 'name'
Here is the full stacktrace:
(python36-venv) [thomas.haider@cn3-hpc emnlp2017-bilstm-cnn-crf]$ python Train_POS.py Using TensorFlow backend. Using existent pickle file: pkl/unidep_pos_komninos_english_embeddings.pkl --- unidep_pos --- 12543 train sentences 2002 dev sentences 2077 test sentences 2019-12-05 17:06:23.735125: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-12-05 17:06:23.746475: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299880000 Hz 2019-12-05 17:06:23.748009: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x51156c0 executing computations on platform Host. Devices: 2019-12-05 17:06:23.748039: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version 2019-12-05 17:06:23.751883: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 266775600 exceeds 10% of system memory. 2019-12-05 17:06:24.227171: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 266775600 exceeds 10% of system memory. 2019-12-05 17:06:25.572919: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 266775600 exceeds 10% of system memory. 2019-12-05 17:06:28.627543: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 266775600 exceeds 10% of system memory. LSTM-Size: [100] Traceback (most recent call last): File "Train_POS.py", line 69, in <module> model.fit(epochs=25) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py", line 381, in fit self.buildModel() File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py", line 210, in buildModel output = crf(output) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/python36-venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper return func(*args, **kwargs) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/python36-venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 463, in __call__ self.build(unpack_singleton(input_shapes)) File "/mnt/beegfs/home/thomas.haider/Documents/workspace/poetry/mtl/emnlp2017-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py", line 317, in build constraint=self.U_constraint) TypeError: add_weight() got multiple values for argument 'name'
I am running python 3.6 in a virtual environment on CentOS.
I am on the newest versions of keras (2.3.1) and tensorflow (2.0).
Should I downgrade?
Thanks,
Thomas
The text was updated successfully, but these errors were encountered: