MCPcopy Create free account
hub / github.com/tensorflow/models / serve

Method serve

official/core/export_base_test.py:27–32  ·  view source on GitHub ↗
(self, inputs: tf.Tensor)

Source from the content-addressed store, hash-verified

25
26 @tf.function
27 def serve(self, inputs: tf.Tensor) -> Mapping[Text, tf.Tensor]:
28 x = inputs if self.preprocessor is None else self.preprocessor(
29 inputs=inputs)
30 x = self.inference_step(x)
31 x = self.postprocessor(x) if self.postprocessor else x
32 return {'outputs': x}
33
34 def get_inference_signatures(
35 self, function_keys: Dict[Text, Text]) -> Mapping[Text, Any]:

Callers 1

test_processorsMethod · 0.95

Calls 1

inference_stepMethod · 0.45

Tested by

no test coverage detected