Solved by jeongukjae in post #5 
              
              
                1 & 3 & 4. After training the model, you can save graph with pre-processing and post-processing steps like below 
...
...

# some training steps
model = ...
model.compile(...)
model.fit(...)

@tf.function
def inference_function(text):
  # do some preprocessing
  text = tf.strings.regex_replace(text,…