Git Product home page Git Product logo

pos-tagger-bert's Issues

Error while running "model.load_weights('bert_tagger.h5')"

Whenever I try to run this "model.load_weights('bert_tagger.h5')" there pops up an error stating "OSError: Unable to open file (unable to open file: name = 'bert_tagger.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)"
Screenshot 2021-01-25 at 9 04 42 PM

Dependencies of the Code

Which versions of tensorflow, bert-tensorflow, and tensorflow_hub did you have when the code was created? I am not able to get the code running due to attribute errors related to these libraries. Thanks.

Below is one such example:

# Instantiate tokenizer
tokenizer = create_tokenizer_from_hub_module()

AttributeError Traceback (most recent call last)
in ()
1 # Instantiate tokenizer
----> 2 tokenizer = create_tokenizer_from_hub_module()

2 frames
/usr/local/lib/python3.6/dist-packages/bert/tokenization.py in load_vocab(vocab_file)
123 vocab = collections.OrderedDict()
124 index = 0
--> 125 with tf.gfile.GFile(vocab_file, "r") as reader:
126 while True:
127 token = convert_to_unicode(reader.readline())

AttributeError: module 'tensorflow' has no attribute 'gfile'

version of tensorflow?

Hi, I'm wondering what's the version of tensorflow of the notebook?
I ran it recently on tensorflow 2.1 and got 2 errors,
one being the tf.Session() is replaced by tf.compat.v1.Session()
and another being tokenizer = create_tokenizer_from_hub_module() got error:
RuntimeError: Exporting/importing meta graphs is not supported when eager execution is enabled. No graph exists when eager execution is enabled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.