---

title: Common Layers


keywords: fastai
sidebar: home_sidebar

summary: "Common layers."
description: "Common layers."
nb_path: "nbs/models/layers/models.layers.common.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/models/layers/models.layers.common.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="FeaturesLinear" class="doc_header"><code>class</code> <code>FeaturesLinear</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/models/layers/common.py#L11" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>FeaturesLinear</code>(<strong><code>field_dims</code></strong>, <strong><code>output_dim</code></strong>=<em><code>1</code></em>) :: <code>Module</code></p>
</blockquote>
<p>References:</p>

<pre><code>1. https://github.com/rixwew/pytorch-fm/blob/master/torchfm/layer.py</code></pre>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="FeaturesEmbedding" class="doc_header"><code>class</code> <code>FeaturesEmbedding</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/models/layers/common.py#L30" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>FeaturesEmbedding</code>(<strong><code>field_dims</code></strong>, <strong><code>embed_dim</code></strong>) :: <code>Module</code></p>
</blockquote>
<p>References:</p>

<pre><code>1. https://github.com/rixwew/pytorch-fm/blob/master/torchfm/layer.py</code></pre>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="MultiLayerPerceptron" class="doc_header"><code>class</code> <code>MultiLayerPerceptron</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/models/layers/common.py#L49" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>MultiLayerPerceptron</code>(<strong><code>input_dim</code></strong>, <strong><code>embed_dims</code></strong>, <strong><code>dropout</code></strong>, <strong><code>output_layer</code></strong>=<em><code>True</code></em>) :: <code>Module</code></p>
</blockquote>
<p>References:</p>

<pre><code>1. https://github.com/rixwew/pytorch-fm/blob/master/torchfm/layer.py</code></pre>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

</div>
 

