{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Simple model for tabular data" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.gen_doc.nbdoc import *\n", "from fastai.tabular.models import TabularModel" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/markdown": [ "
class
TabularModel
[source]TabularModel
(**`emb_szs`**:`ListSizes`, **`n_cont`**:`int`, **`out_sz`**:`int`, **`layers`**:`Collection`\\[`int`\\], **`ps`**:`Collection`\\[`float`\\]=***`None`***, **`emb_drop`**:`float`=***`0.0`***, **`y_range`**:`OptRange`=***`None`***, **`use_bn`**:`bool`=***`True`***, **`bn_final`**:`bool`=***`False`***) :: [`Module`](https://pytorch.org/docs/stable/nn.html#torch.nn.Module)\n",
"\n",
"Basic model for tabular data. "
],
"text/plain": [
"forward
[source]forward
(**`x_cat`**:`Tensor`, **`x_cont`**:`Tensor`) → `Tensor`\n",
"\n",
"Defines the computation performed at every call. Should be overridden by all subclasses.\n",
"\n",
".. note::\n",
" Although the recipe for forward pass needs to be defined within\n",
" this function, one should call the :class:`Module` instance afterwards\n",
" instead of this since the former takes care of running the\n",
" registered hooks while the latter silently ignores them. "
],
"text/plain": [
"get_sizes
[source]get_sizes
(**`layers`**, **`out_sz`**)"
],
"text/plain": [
"