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

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

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript