title: How to use TFF api's for custom usage?
body: <p>I have read and studied the TFF <a href="https://www.tensorflow.org/federated/tutorials/custom_federated_algorithms_2" rel="nofollow noreferrer">guide</a> and <a href="https://www.tensorflow.org/federated/api_docs/python/tff" rel="nofollow noreferrer">APIs</a> pages precisely. But I am confused in some detail parts. </p>
  
  <p>For example, when I want to <strong>wrap/decorate</strong> a <strong>TF/python</strong> function, use these two below APIs:</p>
  
  <pre><code>1. tff.tf_computation()
  2. tff.federated_computation()
  </code></pre>
  
  <p>I can not find what are differences between them and when I am allowed to use them. Especially, in case I want to use other algorithms except for <strong>FedAvg</strong> or <strong>FedSgd</strong>. I wonder if you know:</p>
  
  <ol>
  <li>How they could be used to manipulate inputs? do they work on <em>@CLIENT</em> or <em>@SERVER</em>?</li>
  <li>How I could use them in another usage except for the output of <code>tff.federated_mean</code> or <code>tff.federated_sum</code> that the value will be in the server?  </li>
  <li>How I am able to have access to the detail of data and metrics in <em>@CLIENT</em> and <em>@SERVER</em>?</li>
  <li>Why we should invoke the <code>tff.tf_computation()</code> from <code>tff.federated_computation()</code>? In this <a href="https://stackoverflow.com/questions/55286731/what-is-the-recommended-way-to-mix-tensorflow-and-tensorflow-federated-code">link</a>, there was not any explanation about them.</li>
  <li>Do these APIs (e.g. <code>tff.federated_mean</code> or <code>tff.federated_sum</code>) modify the output elements of each @CLIENT and bring them to the @SERVER?    </li>
  </ol>
  
  <p>Could anyone help me to understand intuitive behind the concept?</p>