Skip to content

run_EHRpretraining_QA2Seq #11

Description

@lishuo-0

Hi,
When I run the code, the following error occurs:
File "/geode2/projects/iu/IN-REGI-PDM/Schizophrenia/Schizophrenia-Workspace/Devon-Shuo/Processed_Data/MED-BERT/Code/run_EHRpretraining_QA2Seq.py", line 121, in model_fn
for name in sorted(features.keys()):
File "/N/soft/rhel7/python/3.9.8/lib/python3.9/site-packages/tensorflow/python/framework/ops.py", line 442, in getattr
self.getattribute(name)
AttributeError: 'Tensor' object has no attribute 'keys'

I have added these two lines of code in order to fix the versioning issue:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
How can I solve this? Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions