How to export/save a text classifier after fine-tuned on a pre-trained BERTHow to train a set of images (apart form the tutorial) and use it to classify in Tensorflow?How to export a trained model from tensorflow and how correctly to import in opencv dnn?Export Tensorflow EstimatorHow to feed input into one layer in a tensorflow pre-trained model?TypeError: __init__() missing 2 required positional arguments: 'message' and 'code'how to solve the no 'estimator' in tensorflow?Converting Tensorflow Graph to use Estimator, get 'TypeError: data type not understood' at loss function using `sampled_softmax_loss` or `nce_loss`Tensorflow Estimator causes 'data type not understood' error at `sampled_softmax_loss` or `nce_loss` for Tensorflow's official word2vec implementationTensor conversion requested dtype int32 for Tensor with dtype int64 - while estimator.export_savedmodelSaving a custom tf.estimator trained model for tensorflow serving
How dangerous are my worn rims?
Single tx included in two different blocks
Generating numbers with cubes
Job interview by video at home and privacy concerns
The answer is a girl's name (my future granddaughter) - can anyone help?
Why did they use ultrafast diodes in a 50 or 60 Hz bridge?
French license plates
Why has Speaker Pelosi been so hesitant to impeach President Trump?
Is there a way to make an animal companion able to read a language?
Giving a good fancy look to a simple table
What does a textbook look like while you are writing it?
Avoiding dust scattering when you drill
How to level a picture frame hung on a single nail?
Ĉi tie or ĉi-tie? Why do people sometimes hyphenate ĉi tie?
Rank-one positive decomposition for a entry-wise positive positive definite matrix
Do jackscrews suffer from blowdown?
Citing CPLEX 12.9
Everyone Gets a Window Seat
IEEE 754 square root with Newton-Raphson
Would a horse be sufficient buffer to prevent injury when falling from a great height?
Parent asking for money after I moved out
Bothered by watching coworkers slacking off
Re-entering the UK after overstaying in 2008
Could Boris Johnson face criminal charges for illegally proroguing Parliament?
How to export/save a text classifier after fine-tuned on a pre-trained BERT
How to train a set of images (apart form the tutorial) and use it to classify in Tensorflow?How to export a trained model from tensorflow and how correctly to import in opencv dnn?Export Tensorflow EstimatorHow to feed input into one layer in a tensorflow pre-trained model?TypeError: __init__() missing 2 required positional arguments: 'message' and 'code'how to solve the no 'estimator' in tensorflow?Converting Tensorflow Graph to use Estimator, get 'TypeError: data type not understood' at loss function using `sampled_softmax_loss` or `nce_loss`Tensorflow Estimator causes 'data type not understood' error at `sampled_softmax_loss` or `nce_loss` for Tensorflow's official word2vec implementationTensor conversion requested dtype int32 for Tensor with dtype int64 - while estimator.export_savedmodelSaving a custom tf.estimator trained model for tensorflow serving
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I followed the steps on the Predicting Movie Reviews with BERT on TF Hub here: https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb#scrollTo=PPVEXhNjYXC-.
At the end, how do I export the model to be used/loaded as a classifier later?
I found a link (https://guillaumegenthial.github.io/serving-tensorflow-estimator.html) that shows that I can export the estimator as a tf.saved_model. However, I got stuck on creating the 'serving_input_receiver_fn()'.
python tensorflow tensorflow-estimator
add a comment
|
I followed the steps on the Predicting Movie Reviews with BERT on TF Hub here: https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb#scrollTo=PPVEXhNjYXC-.
At the end, how do I export the model to be used/loaded as a classifier later?
I found a link (https://guillaumegenthial.github.io/serving-tensorflow-estimator.html) that shows that I can export the estimator as a tf.saved_model. However, I got stuck on creating the 'serving_input_receiver_fn()'.
python tensorflow tensorflow-estimator
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23
add a comment
|
I followed the steps on the Predicting Movie Reviews with BERT on TF Hub here: https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb#scrollTo=PPVEXhNjYXC-.
At the end, how do I export the model to be used/loaded as a classifier later?
I found a link (https://guillaumegenthial.github.io/serving-tensorflow-estimator.html) that shows that I can export the estimator as a tf.saved_model. However, I got stuck on creating the 'serving_input_receiver_fn()'.
python tensorflow tensorflow-estimator
I followed the steps on the Predicting Movie Reviews with BERT on TF Hub here: https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb#scrollTo=PPVEXhNjYXC-.
At the end, how do I export the model to be used/loaded as a classifier later?
I found a link (https://guillaumegenthial.github.io/serving-tensorflow-estimator.html) that shows that I can export the estimator as a tf.saved_model. However, I got stuck on creating the 'serving_input_receiver_fn()'.
python tensorflow tensorflow-estimator
python tensorflow tensorflow-estimator
asked Mar 28 at 21:16
ebaikebaik
263 bronze badges
263 bronze badges
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23
add a comment
|
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406968%2fhow-to-export-save-a-text-classifier-after-fine-tuned-on-a-pre-trained-bert%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406968%2fhow-to-export-save-a-text-classifier-after-fine-tuned-on-a-pre-trained-bert%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What about using pickle to serialize it?
– Alberto Bonsanto
Mar 28 at 21:19
@AlbertoBonsanto Thanks for your input. Could you elaborate on that? Do you mean dump the 'estimator' using pickle?
– ebaik
Mar 29 at 15:55
any luck on this? i am stuck in same situation?
– Upasana Mittal
Jul 28 at 4:23