openai / deeptype

Code for the paper "DeepType: Multilingual Entity Linking by Neural Type System Evolution"
https://arxiv.org/abs/1802.01021
Other
649 stars 146 forks source link

train_type error #37

Open ghost opened 6 years ago

ghost commented 6 years ago

I am having an issue with the training, even running the examplepython3 learning/train_type.py learning/test/config.json give me the following error: File "learning/train_type.py", line 2690, in main() File "learning/train_type.py", line 2623, in main create_variables=True) File "learning/train_type.py", line 1775, in init clip_norm=self.clip_norm) File "learning/train_type.py", line 1467, in build_model is_training=is_training) File "learning/train_type.py", line 1020, in build_recurrent direction="bidirectional") TypeError: init() got multiple values for argument 'input_mode' Any idea what might be causing this? Thanks!

abhimanu commented 5 years ago

Hi, I am getting the exact same error, after following all the steps, generating my evolved type output and creating the learning config file. I get the following error:

Traceback (most recent call last):
  File "learning/train_type.py", line 2690, in <module>
    main()
  File "learning/train_type.py", line 2623, in main
    create_variables=True)
  File "learning/train_type.py", line 1775, in __init__
    clip_norm=self.clip_norm)
  File "learning/train_type.py", line 1467, in build_model
    is_training=is_training)
  File "learning/train_type.py", line 1020, in build_recurrent
    direction="bidirectional")
TypeError: __init__() got multiple values for argument 'input_mode'

Any ideas? Thanks.

JonathanRaiman commented 5 years ago

From what I understand this is caused by a tensor flow version mismatch. tf 1.4 vs 1.12 or newer. input_mode argument's position was changed in the newest version

amandalmia14 commented 5 years ago

@JonathanRaiman Neither 1.4 or 1.12 is working. Can you please tell us which version of the tensorflow need to be installed.

Thanks

mdocekal commented 5 years ago

I solved the problem by installing the tensorflow-gpu==1.4.0

pip install tensorflow-gpu==1.4.0

For that version (according to https://www.tensorflow.org/install/source#tested_build_configurations) you need CUDA v8, which can be downloaded from:

https://developer.nvidia.com/cuda-toolkit-archive

The last thing that I needed to install was cuDNN v6.0. You can find it at

https://developer.nvidia.com/rdp/cudnn-archive

and install it according to these instructions:

https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html