ZhiGroup / Med-BERT

Med-BERT, contextualized embedding model for structured EHR data
Apache License 2.0
244 stars 62 forks source link

Fine tuning task: Predicting Diabetes patient risk to develop Heart Failure with Med-BERT #17

Closed hikf3 closed 1 year ago

hikf3 commented 1 year ago

Can you please clarify after converting the pretrained model to Pytorch, is there any additional step? I am not able to understand the input for the following in the fine tuning model definition.

self.PreBERTmodel=BertForSequenceClassification.from_pretrained("pretrained_py_models/45M_chk"

)

The output of converting model from TenforFlow to Pytorch was a .bin file but the above code uses something different.

lrasmy commented 1 year ago

The path used is the path for the model folder containing both the model checkpoint (.bin) and the configuration file (config.json)