title: Is there a way to call functions from a reloaded tf.module model?
body: <p>I'm currently working on a Project and I'm lost encountering this problem, I want to save the model I created call the function when I needed to reload it.
  The module I created is something like this:</p>
  <pre><code>class beamModule(tf.Module):
      def __init__(self,encode,decode,optimizer,transConfig):
      ...
      def translate(self,sentences):
      ...
          return bestTranslation
  </code></pre>
  <p>Well this produced a great output when I run it normally and whenever I save the model these warnings appear:</p>
  <pre><code>tf.saved_model.save(modelTranslator,'enilo-model')
  
  WARNING:absl:Found untraced functions such as encoder_layer_call_fn, encoder_layer_call_and_return_conditional_losses, decoder_layer_call_fn, decoder_layer_call_and_return_conditional_losses, embedding_layer_call_fn while saving (showing 5 of 24). These functions will not be directly callable after loading.
  </code></pre>
  <p>And lastly when I reload the model</p>
  <pre><code>reloaded = tf.saved_model.load('enilo-model')
  result = reloaded.translate('what are you doing')
  </code></pre>
  <p>this error prompt appears</p>
  <pre><code>AttributeError: '_UserObject' object has no attribute 'translate'
  </code></pre>
  <p>I’m currently lost, thank you in advance for attending to my questions.</p>