Comments (3)
@accioharshita Hi, I was having the same problem. In fact, I was using the exact same code as you. I managed to solve my problem by importing Bert through the keras_nlp
library. Here is the code I ended up with:
text_input = tf.keras.layers.Input(shape=(), dtype=tf.string)
preprocessor = keras_nlp.models.BertPreprocessor.from_preset("bert_base_en_uncased",trainable=True)
encoder_inputs = preprocessor(text_input)
encoder = keras_nlp.models.BertBackbone.from_preset("bert_base_en_uncased")
outputs = encoder(encoder_inputs)
pooled_output = outputs["pooled_output"] # [batch_size, 768].
sequence_output = outputs["sequence_output"] # [batch_size, seq_length, 768].
from bert.
I have the same problem. With the URL was working fine, but with the model working locally, for some reason it crashes
from bert.
@SoumyaCodes2020 can you please let me know how you saved model with this approach. I'm using this approach model3.save("model3.keras")
model3 = keras.models.load_model("model3.keras") but getting error
No vocabulary has been set for WordPieceTokenizer. Make sure to pass a `vocabulary` argument when creating the layer.
from bert.
Related Issues (20)
- sussy baka HOT 1
- Data source you used for training the wordpiece model in your original paper HOT 2
- Notas
- Bert:tensorflow:Error recorded from training_loop: Read less bytes than requested HOT 2
- load_model
- My Gmail account password recovery HOT 1
- Hi HOT 1
- bert loading
- Reproducing Experiment Results for Data Augmentation with TriviaQA
- Sentence Splitting Approach in BERT Preprocessing
- Forget password Gmail account HOT 1
- Awesomeness 👌
- Extraction of context Embeddings
- bert中文交流群,交流应用和训练心得 HOT 2
- raise SSLError(e, request=request)
- The MRPC dataset downloaded from the script is missing the train.tsv file HOT 1
- Language Translation for classification
- MRPC and CoLA Dataset UnicodeDecodeError
- Internal: Blas GEMM launch failed when running classifier for URLs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bert.