Skip to content
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

Train your own medical Q&A retrieval model #11

Open
KingsonSingh opened this issue Aug 7, 2019 · 4 comments
Open

Train your own medical Q&A retrieval model #11

KingsonSingh opened this issue Aug 7, 2019 · 4 comments

Comments

@KingsonSingh
Copy link

When I am trying to execute Train_Your_Own_Q_A_ModelsV0.2.0.ipynb file locally on my machine, I get the below error-

File "Train_Your_Own_Q_A_ModelsV0.2.0.ipynb", line 47, in
medical_qa_model = MedicalQAModelwithBert(config_file=os.path.join(pretrained_path, 'bert_config.json'),checkpoint_file=os.path.join(pretrained_path, 'biobert_model.ckpt'))
File "/docproduct/models.py", line 79, in init
build=build)
File "/docproduct/bert.py", line 214, in build_model_from_config
model.build(input_shape=[(None, None), (None, None), (None, None)])
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py", line 720, in build
raise ValueError('You cannot build your model by calling build '
ValueError: You cannot build your model by calling build if your layers do not support float type inputs. Instead, in order to instantiate and build your model, call your model on real tensor data (of the correct dtype).

Please help me out!!
Thanks !

@Santosh-Gupta
Copy link
Member

It's hard to tell what the issue is without knowing your local machine, but common errors are trying to run it in tensorflow 1.0, or if the machine is windows.

@KingsonSingh
Copy link
Author

I have ubuntu 18.04 machine.
python 3.6.8

packages are installed in python

absl-py==0.7.1
astor==0.8.0
bert-serving-client==1.9.6
bert-serving-server==1.9.6
bleach==1.5.0
certifi==2019.6.16
chardet==3.0.4
cloudpickle==1.2.1
cycler==0.10.0
decorator==4.4.0
docproduct==0.2.0
faiss==1.5.3
faiss-cpu==1.5.3
gast==0.2.2
google-pasta==0.1.7
GPUtil==1.4.0
grpcio==1.22.0
h5py==2.9.0
html5lib==0.9999999
idna==2.8
intel-openmp==2019.0
joblib==0.13.2
Keras==2.2.4
Keras-Applications==1.0.8
keras-embed-sim==0.3.0
keras-layer-normalization==0.11.0
keras-multi-head==0.18.0
keras-pos-embd==0.9.0
keras-position-wise-feed-forward==0.4.0
Keras-Preprocessing==1.1.0
keras-self-attention==0.39.0
keras-transformer==0.21.0
kiwisolver==1.1.0
Markdown==3.1.1
matplotlib==3.1.1
mkl==2019.0
numpy==1.17.0
opencv-python==4.0.1.23
pandas==0.25.0
pkg-resources==0.0.0
protobuf==3.9.0
pyarrow==0.14.1
pycrypto==2.6.1
pycurl==7.43.0.3
pyparsing==2.4.2
python-dateutil==2.8.0
pytz==2019.2
PyYAML==5.1.2
pyzmq==18.0.2
requests==2.22.0
scikit-learn==0.21.3
scipy==1.3.0
six==1.12.0
sklearn==0.0
tb-nightly==1.14.0a20190301
tensorboard==1.14.0
tensorflow-estimator==1.14.0
tensorflow-gpu==2.0.0a0
tensorflow-probability==0.7.0
termcolor==1.1.0
tf-estimator-nightly==1.14.0.dev2019030115
tqdm==4.32.2
urllib3==1.25.3
Werkzeug==0.15.5
wrapt==1.11.2

thanks!

@Santosh-Gupta
Copy link
Member

wait, are you trying to execute the .ipnb file? It's a notebook file, you need to convert it

@KingsonSingh
Copy link
Author

Yes, I have converted .ipnb file into .py file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants