Using keras.layers.Add() in a keras.sequential model The Next CEO of Stack OverflowAdd Tensorflow pre-processing to existing Keras model (for use in Tensorflow Serving)Add Tensorflow pre-processing to existing Keras model (for use in Tensorflow Serving)Training a model using a pre-trained modelServing Keras Models With Tensorflow ServingWhere should pre-processing and post-processing steps be executed when a TF model is served using TensorFlow serving?Does tensorflow serving work with more than one input (or output)?Error with Concatenation layer when serving Keras-built Tensorflow model with Tensorflow ServingError when checking target: expected dense_3 to have shape (2,) but got array with shape (1,)Deploy pre-trained Inception in TensorflowServing fails: SavedModel has no variablesServing a Keras model with Tensorflow ServingIncluding BEAM preprocessing graph in Keras models at serving

Is it safe to use c_str() on a temporary string?

What can we do to stop prior company from asking us questions?

% symbol leads to superlong (forever?) compilations

How do spells that require an ability check vs. the caster's spell save DC work?

Return the Closest Prime Number

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Only print output after finding pattern

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

What is the purpose of the Evocation wizard's Potent Cantrip feature?

WOW air has ceased operation, can I get my tickets refunded?

How long to clear the 'suck zone' of a turbofan after start is initiated?

Does the Brexit deal have to be agreed by both Houses?

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

Why here is plural "We went to the movies last night."

Term for the "extreme-extension" version of a straw man fallacy?

Is the concept of a "numerable" fiber bundle really useful or an empty generalization?

Text adventure game code

What does this shorthand mean?

Why do remote companies require working in the US?

Describing a person. What needs to be mentioned?

Whats the best way to handle refactoring a big file?

Unreliable Magic - Is it worth it?

How do scammers retract money, while you can’t?



Using keras.layers.Add() in a keras.sequential model



The Next CEO of Stack OverflowAdd Tensorflow pre-processing to existing Keras model (for use in Tensorflow Serving)Add Tensorflow pre-processing to existing Keras model (for use in Tensorflow Serving)Training a model using a pre-trained modelServing Keras Models With Tensorflow ServingWhere should pre-processing and post-processing steps be executed when a TF model is served using TensorFlow serving?Does tensorflow serving work with more than one input (or output)?Error with Concatenation layer when serving Keras-built Tensorflow model with Tensorflow ServingError when checking target: expected dense_3 to have shape (2,) but got array with shape (1,)Deploy pre-trained Inception in TensorflowServing fails: SavedModel has no variablesServing a Keras model with Tensorflow ServingIncluding BEAM preprocessing graph in Keras models at serving










1















Using TF 2.0 and tfp probability layers, I have constructed a keras.sequential model. I would like to export it for serving with TensorFlow Serving, and I would like to include the preprocessing and post processing steps in the servable.



My preprocessing steps are fairly simple-- fill NAs with explicit values, encoding a few strings as floats, normalize inputs, and denormalize outputs. For training, I have been doing the pre/post processing with pandas and numpy.



I know that I can export my Keras model's weights, wrap the keras.sequential model's architecture in a bigger TensorFlow graph, use low-level ops like tf.math.subtract(inputs, vector_of_feature_means) to do pre/post processing operations, define tf.placeholders for my inputs and outputs, and make a servable, but I feel like there has to be a cleaner way of doing this.



Is it possible to use keras.layers.Add() and keras.layers.Multiply() in a keras.sequence model for explicit preprocessing steps, or is there some more standard way of doing these things?










share|improve this question



















  • 1





    stackoverflow.com/questions/41672114/… is related, but a bit outdated

    – James McKeown
    Mar 21 at 16:48















1















Using TF 2.0 and tfp probability layers, I have constructed a keras.sequential model. I would like to export it for serving with TensorFlow Serving, and I would like to include the preprocessing and post processing steps in the servable.



My preprocessing steps are fairly simple-- fill NAs with explicit values, encoding a few strings as floats, normalize inputs, and denormalize outputs. For training, I have been doing the pre/post processing with pandas and numpy.



I know that I can export my Keras model's weights, wrap the keras.sequential model's architecture in a bigger TensorFlow graph, use low-level ops like tf.math.subtract(inputs, vector_of_feature_means) to do pre/post processing operations, define tf.placeholders for my inputs and outputs, and make a servable, but I feel like there has to be a cleaner way of doing this.



Is it possible to use keras.layers.Add() and keras.layers.Multiply() in a keras.sequence model for explicit preprocessing steps, or is there some more standard way of doing these things?










share|improve this question



















  • 1





    stackoverflow.com/questions/41672114/… is related, but a bit outdated

    – James McKeown
    Mar 21 at 16:48













1












1








1








Using TF 2.0 and tfp probability layers, I have constructed a keras.sequential model. I would like to export it for serving with TensorFlow Serving, and I would like to include the preprocessing and post processing steps in the servable.



My preprocessing steps are fairly simple-- fill NAs with explicit values, encoding a few strings as floats, normalize inputs, and denormalize outputs. For training, I have been doing the pre/post processing with pandas and numpy.



I know that I can export my Keras model's weights, wrap the keras.sequential model's architecture in a bigger TensorFlow graph, use low-level ops like tf.math.subtract(inputs, vector_of_feature_means) to do pre/post processing operations, define tf.placeholders for my inputs and outputs, and make a servable, but I feel like there has to be a cleaner way of doing this.



Is it possible to use keras.layers.Add() and keras.layers.Multiply() in a keras.sequence model for explicit preprocessing steps, or is there some more standard way of doing these things?










share|improve this question
















Using TF 2.0 and tfp probability layers, I have constructed a keras.sequential model. I would like to export it for serving with TensorFlow Serving, and I would like to include the preprocessing and post processing steps in the servable.



My preprocessing steps are fairly simple-- fill NAs with explicit values, encoding a few strings as floats, normalize inputs, and denormalize outputs. For training, I have been doing the pre/post processing with pandas and numpy.



I know that I can export my Keras model's weights, wrap the keras.sequential model's architecture in a bigger TensorFlow graph, use low-level ops like tf.math.subtract(inputs, vector_of_feature_means) to do pre/post processing operations, define tf.placeholders for my inputs and outputs, and make a servable, but I feel like there has to be a cleaner way of doing this.



Is it possible to use keras.layers.Add() and keras.layers.Multiply() in a keras.sequence model for explicit preprocessing steps, or is there some more standard way of doing these things?







tensorflow machine-learning keras tensorflow-serving tf.keras






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 0:07









alift

176116




176116










asked Mar 21 at 16:14









James McKeownJames McKeown

1147




1147







  • 1





    stackoverflow.com/questions/41672114/… is related, but a bit outdated

    – James McKeown
    Mar 21 at 16:48












  • 1





    stackoverflow.com/questions/41672114/… is related, but a bit outdated

    – James McKeown
    Mar 21 at 16:48







1




1





stackoverflow.com/questions/41672114/… is related, but a bit outdated

– James McKeown
Mar 21 at 16:48





stackoverflow.com/questions/41672114/… is related, but a bit outdated

– James McKeown
Mar 21 at 16:48












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/3.0/"u003ecc by-sa 3.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%2f55284828%2fusing-keras-layers-add-in-a-keras-sequential-model%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%2f55284828%2fusing-keras-layers-add-in-a-keras-sequential-model%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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?