The following **defines** the NN. The definition goes into this [protocol buffer](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/framework.proto).
```python
x = fluid.layers.data(name='x', shape=[13], dtype='float32')
y = fluid.layers.data(name='y', shape=[1], dtype='float32')
- Variables: `x`, `y`, `y_predict`, `cost` and `avg_cost`. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/framework.py#L93)
- Layers: `fluid.layers.data`, `fluid.layers.fc` and `fluid.layers.mean` are layers. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers.py)
- Every Layer has one or more operators and variables/parameters
- All the operators are defined at [`paddle/operators/`](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators). Other worth-looking files:
- Base class: [`paddle/framework/operator.h`](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/operator.h)
- Scope: [paddle/framework/scope.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/scope.h). Where all the variables live
- Variable: [paddle/framework/variable.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/variable.h). Where all the data (most likely tensors) live
- Tensor: [paddle/framework/tensor.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/tensor.h). Where we allocate memory through [`paddle/memory/`](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/memory)
<spanid="paddlepaddle-fluid-source-code-overview"></span><h1>PaddlePaddle Fluid Source Code Overview<aclass="headerlink"href="#paddlepaddle-fluid-source-code-overview"title="Permalink to this headline">¶</a></h1>
<spanid="compile-time"></span><h1>Compile Time<aclass="headerlink"href="#compile-time"title="Permalink to this headline">¶</a></h1>
<p>The following <strong>defines</strong> the NN. The definition goes into this <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/framework.proto">protocol buffer</a>.</p>
<li>Layers: <codeclass="docutils literal"><spanclass="pre">fluid.layers.data</span></code>, <codeclass="docutils literal"><spanclass="pre">fluid.layers.fc</span></code> and <codeclass="docutils literal"><spanclass="pre">fluid.layers.mean</span></code> are layers. <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers.py">Python</a><ul>
<li>Every Layer has one or more operators and variables/parameters<ul>
<li>All the operators are defined at <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators"><codeclass="docutils literal"><spanclass="pre">paddle/operators/</span></code></a>. Other worth-looking files:<ul>
<li>Place: <codeclass="docutils literal"><spanclass="pre">place</span></code>. one of CPU, GPU or FPGA. <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/place.h">C++</a><ul>
<li>The device handle are at <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/device_context.h">paddle/platform/device_context.h</a></li>
<li>Feeds the data: <codeclass="docutils literal"><spanclass="pre">feed=feeder.feed(data)</span></code></li>
<li>Evaluates all the operators</li>
<li>Fetches the result: <codeclass="docutils literal"><spanclass="pre">fetch_list=[avg_cost]</span></code></li>
</ul>
</li>
<li>Other worth looking files:<ul>
<li>Scope: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/scope.h">paddle/framework/scope.h</a>. Where all the variables live<ul>
<li>Variable: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/variable.h">paddle/framework/variable.h</a>. Where all the data (most likely tensors) live<ul>
<li>Tensor: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/tensor.h">paddle/framework/tensor.h</a>. Where we allocate memory through <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/memory"><codeclass="docutils literal"><spanclass="pre">paddle/memory/</span></code></a></li>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.
The following **defines** the NN. The definition goes into this [protocol buffer](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/framework.proto).
```python
x = fluid.layers.data(name='x', shape=[13], dtype='float32')
y = fluid.layers.data(name='y', shape=[1], dtype='float32')
- Variables: `x`, `y`, `y_predict`, `cost` and `avg_cost`. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/framework.py#L93)
- Layers: `fluid.layers.data`, `fluid.layers.fc` and `fluid.layers.mean` are layers. [Python](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers.py)
- Every Layer has one or more operators and variables/parameters
- All the operators are defined at [`paddle/operators/`](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators). Other worth-looking files:
- Base class: [`paddle/framework/operator.h`](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/operator.h)
- Scope: [paddle/framework/scope.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/scope.h). Where all the variables live
- Variable: [paddle/framework/variable.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/variable.h). Where all the data (most likely tensors) live
- Tensor: [paddle/framework/tensor.h](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/tensor.h). Where we allocate memory through [`paddle/memory/`](https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/memory)
<p>The following <strong>defines</strong> the NN. The definition goes into this <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/framework.proto">protocol buffer</a>.</p>
<li>Layers: <codeclass="docutils literal"><spanclass="pre">fluid.layers.data</span></code>, <codeclass="docutils literal"><spanclass="pre">fluid.layers.fc</span></code> and <codeclass="docutils literal"><spanclass="pre">fluid.layers.mean</span></code> are layers. <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers.py">Python</a><ul>
<li>Every Layer has one or more operators and variables/parameters<ul>
<li>All the operators are defined at <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/operators"><codeclass="docutils literal"><spanclass="pre">paddle/operators/</span></code></a>. Other worth-looking files:<ul>
<li>Place: <codeclass="docutils literal"><spanclass="pre">place</span></code>. one of CPU, GPU or FPGA. <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/place.h">C++</a><ul>
<li>The device handle are at <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/platform/device_context.h">paddle/platform/device_context.h</a></li>
<li>Feeds the data: <codeclass="docutils literal"><spanclass="pre">feed=feeder.feed(data)</span></code></li>
<li>Evaluates all the operators</li>
<li>Fetches the result: <codeclass="docutils literal"><spanclass="pre">fetch_list=[avg_cost]</span></code></li>
</ul>
</li>
<li>Other worth looking files:<ul>
<li>Scope: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/scope.h">paddle/framework/scope.h</a>. Where all the variables live<ul>
<li>Variable: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/variable.h">paddle/framework/variable.h</a>. Where all the data (most likely tensors) live<ul>
<li>Tensor: <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/framework/tensor.h">paddle/framework/tensor.h</a>. Where we allocate memory through <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/tree/develop/paddle/memory"><codeclass="docutils literal"><spanclass="pre">paddle/memory/</span></code></a></li>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.