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;









5















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()'.










share|improve this question
























  • 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

















5















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()'.










share|improve this question
























  • 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













5












5








5








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()'.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












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
);



);














draft saved

draft discarded
















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
















draft saved

draft discarded















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현