Skip to content

can't from transformers import TFBertModel  #20393

@minig0lem

Description

@minig0lem

System Info

  • transformers version: 4.24.0
  • Platform: Windows-10-10.0.19044-SP0
  • Python version: 3.10.8
  • Huggingface_hub version: 0.11.0
  • PyTorch version (GPU?): 1.13.0+cpu (False)
  • Tensorflow version (GPU?): 2.11.0 (False)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

@LysandreJik @rocket

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

image

Expected behavior

from transformers import BertTokenizer works well.

but from transformers import TFBertModel doesn't work .

It runs like picture above.

How do I resolve this error(ModuleNotFoundError: No module named 'keras.saving.hdf5_format')?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions