# torchfm package

- torchfm.dataset
  - torchfm.dataset.avazu
  - torchfm.dataset.criteo
  - torchfm.dataset.movielens
- torchfm.model
  - torchfm.model.afi
  - torchfm.model.afm
  - torchfm.model.dcn
  - torchfm.model.dfm
  - torchfm.model.ffm
  - torchfm.model.fm
  - torchfm.model.fnfm
  - torchfm.model.fnn
  - torchfm.model.lr
  - torchfm.model.nfm
  - torchfm.model.pnn
  - torchfm.model.wd
  - torchfm.model.xdfm

## torchfm.layer

class `torchfm.layer.``AttentionalFactorizationMachine`(embed_dim, attn_size, dropouts)
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``CompressedInteractionNetwork`(input_dim, cross_layer_sizes, split_half=True)
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``CrossNetwork`(input_dim, num_layers)
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``FactorizationMachine`(reduce_sum=True)
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``FeaturesEmbedding`(field_dims, embed_dim)
  `forward`(x)
    Parameters

      x – Long tensor of size `(batch_size, num_fields)`

class `torchfm.layer.``FeaturesLinear`(field_dims, output_dim=1)
  `forward`(x)
    Parameters

      x – Long tensor of size `(batch_size, num_fields)`

class `torchfm.layer.``FieldAwareFactorizationMachine`(field_dims, embed_dim)
  `forward`(x)
    Parameters

      x – Long tensor of size `(batch_size, num_fields)`

class `torchfm.layer.``InnerProductNetwork`
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``MultiLayerPerceptron`(input_dim, embed_dims, dropout, output_layer=True)
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`

class `torchfm.layer.``OuterProductNetwork`(num_fields, embed_dim, kernel_type='mat')
  `forward`(x)
    Parameters

      x – Float tensor of size `(batch_size, num_fields, embed_dim)`