soutsios / pos-tagger-bert Goto Github PK
View Code? Open in Web Editor NEWBERT fine-tuning for POS tagging task (Keras)
BERT fine-tuning for POS tagging task (Keras)
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.
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.