8 lines (8 with data), 10.3 kB
<( docutils.nodesdocument)}( rawsource children]h section)}(hhh](h title)}(hMulti-modal Autoencodersh]h TextMulti-modal Autoencoders
}(hhparenthhhsourceNlineNuba
attributes}(ids]classes]names]dupnames]backrefs]utagnamehhhhhh=/home/jona/work/phd/maui/maui/doc/autoencoder-integration.rsthKubh paragraph)}(hXß Autoencoders are hourglass-shaped neural networks that are trained to reconstruct the input data after passing it through a bottleneck layer. Thereby, autoencoders learn an efficient lower dimension representation of high-dimensional data, a "latent factor" representation of the data. The Multi-modal autoencoders take data from different modalities and learn latent factor representations of the data. In the figure below, the direction of data flow is left to right. The three different-colored matrices on the left represent data from three different modalities. The three matrices on the right represent the reconstruction of the input data, and the mixed-color matrix on the bottom represents the latent factor view of the data.h]hXã Autoencoders are hourglass-shaped neural networks that are trained to reconstruct the input data after passing it through a bottleneck layer. Thereby, autoencoders learn an efficient lower dimension representation of high-dimensional data, a âlatent factorâ representation of the data. The Multi-modal autoencoders take data from different modalities and learn latent factor representations of the data. In the figure below, the direction of data flow is left to right. The three different-colored matrices on the left represent data from three different modalities. The three matrices on the right represent the reconstruction of the input data, and the mixed-color matrix on the bottom represents the latent factor view of the data.
}(hh/hh-hhhNhNubah}(h]h!]h#]h%]h']uh)h+hh*hKhhhhubh comment)}(h_fig-integration-autoencoderh]h_fig-integration-autoencoder
}(hhhh=ubah}(h]h!]h#]h%]h'] xml:spacepreserveuh)h;hhhhhh*hKubh figure)}(hhh]h image)}(h/.. figure:: _static/integration-autoencoder.pngh]h}(h]h!]h#]h%]h']uri#_static/integration-autoencoder.png
candidates}*h_suh)hRhhOhh*hKubah}(h]h!]h#]h%]h']uh)hMhhhhhh*hKubh,)}(hIntegration Autoencoderh]hIntegration Autoencoder
}(hhkhhihhhNhNubah}(h]h!]h#]h%]h']uh)h+hh*hKhhhhubh
)}(hhh](h)}(hVariational Autoencodersh]hVariational Autoencoders
}(hh|hhzhhhNhNubah}(h]h!]h#]h%]h']uh)hhhwhhhh*hKubh,)}(hMaui uses a Variational Autoencoder, which means it learns a bayesian latent variable model. This is achieved by minimizing the following loss function:h]hMaui uses a Variational Autoencoder, which means it learns a bayesian latent variable model. This is achieved by minimizing the following loss function:
}(hhhhhhhNhNubah}(h]h!]h#]h%]h']uh)h+hh*hKhhwhhubh,)}(hd:math:`\mathcal{L} = -\mathbf{E}_{q(z|x)}\big[ log(p(x|z)) \big] + D_{KL}\big( q(z|x)~\|~p(z) \big)`h]h math)}(hd:math:`\mathcal{L} = -\mathbf{E}_{q(z|x)}\big[ log(p(x|z)) \big] + D_{KL}\big( q(z|x)~\|~p(z) \big)`h]h\\mathcal{L} = -\mathbf{E}_{q(z|x)}\big[ log(p(x|z)) \big] + D_{KL}\big( q(z|x)~\|~p(z) \big)
}(hhhhubah}(h]h!]h#]h%]h']uh)hhhubah}(h]h!]h#]h%]h']uh)h+hh*hKhhwhhubh,)}(hÂThe first term represents the cross-entropy reconstruction loss, and the second term is the Kullback-Leibler divergence between the latent factors distribution and a gaussian prior :math:`p(z)`.h](hµThe first term represents the cross-entropy reconstruction loss, and the second term is the Kullback-Leibler divergence between the latent factors distribution and a gaussian prior
}(hµThe first term represents the cross-entropy reconstruction loss, and the second term is the Kullback-Leibler divergence between the latent factors distribution and a gaussian prior hh°hhhNhNubh)}(h:math:`p(z)`h]hp(z)
}(hhhh¹ubah}(h]h!]h#]h%]h']uh)hhh°ubh.
}(h.hh°hhhNhNubeh}(h]h!]h#]h%]h']uh)h+hh*hKhhwhhubeh}(h]variational-autoencodersah!]h#]variational autoencodersah%]h']uh)h hhhhhh*hKubh
)}(hhh](h)}(hStacked Autoencodersh]hStacked Autoencoders
}(hhßhhÝhhhNhNubah}(h]h!]h#]h%]h']uh)hhhÚhhhh*hKubh,)}(hX¢ As the figure above indicates, it is possible to insert extra layers between the input and the bottleneck layers, and between the bottleneck and the output layers. This is sometimes called stacked autoencoders. :doc:`maui` allows this architecture to be varied when instantiating the model, using the ``n_hidden`` parameter. The ``n_latent`` parameter determines the size of the bottleneck layer (latent factor layer).h](hÓAs the figure above indicates, it is possible to insert extra layers between the input and the bottleneck layers, and between the bottleneck and the output layers. This is sometimes called stacked autoencoders.
}(hÓAs the figure above indicates, it is possible to insert extra layers between the input and the bottleneck layers, and between the bottleneck and the output layers. This is sometimes called stacked autoencoders. hhëhhhNhNubsphinx.addnodespending_xref)}(h:doc:`maui`h]h inline)}(hhùh]hmaui
}(hhhhýubah}(h]h!](xrefstdstd-doceh#]h%]h']uh)hûhh÷ubah}(h]h!]h#]h%]h']reftypedoc refdomainj refexplicit reftargetmauirefdocautoencoder-integrationrefwarnuh)hõhh*hKhhëubhO allows this architecture to be varied when instantiating the model, using the
}(hO allows this architecture to be varied when instantiating the model, using the hhëhhhNhNubh literal)}(h``n_hidden``h]hn_hidden
}(hhhj# ubah}(h]h!]h#]h%]h']uh)j! hhëubh parameter. The
}(h parameter. The hhëhhhNhNubj" )}(h``n_latent``h]hn_latent
}(hhhj6 ubah}(h]h!]h#]h%]h']uh)j! hhëubhM parameter determines the size of the bottleneck layer (latent factor layer).
}(hM parameter determines the size of the bottleneck layer (latent factor layer).hhëhhhNhNubeh}(h]h!]h#]h%]h']uh)h+hh*hKhhÚhhubh
literal_block)}(h3maui_model = maui.Maui(n_hidden=[900], n_latent=70)h]h3maui_model = maui.Maui(n_hidden=[900], n_latent=70)
}(hhhjQ ubah}(h]h!]h#]h%]h']hKhLlanguagepythonlinenoshighlight_args}uh)jO hh*hKhhÚhhubh,)}(hkinstantiates a Maui model with one hidden layer with 900 units, and 70 units in the bottleneck layer, whileh]hkinstantiates a Maui model with one hidden layer with 900 units, and 70 units in the bottleneck layer, while
}(hjf hjd hhhNhNubah}(h]h!]h#]h%]h']uh)h+hh*hKhhÚhhubjP )}(h9maui_model = maui.Maui(n_hidden=[1300, 900], n_latent=60)h]h9maui_model = maui.Maui(n_hidden=[1300, 900], n_latent=60)
}(hhhjr ubah}(h]h!]h#]h%]h']hKhLj_ pythonja jb }uh)jO hh*hK hhÚhhubh,)}(h[will instantiate a maui model with two hidden layers with 1300 and 900 units, respectively.h]h[will instantiate a maui model with two hidden layers with 1300 and 900 units, respectively.
}(hj hj hhhNhNubah}(h]h!]h#]h%]h']uh)h+hh*hK$hhÚhhubeh}(h]stacked-autoencodersah!]h#]stacked autoencodersah%]h']uh)h hhhhhh*hKubeh}(h]multi-modal-autoencodersah!]h#]multi-modal autoencodersah%]h']uh)h hhhhhh*hKubah}(h]h!]h#]h%]h']sourceh*uh)hcurrent_sourceNcurrent_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampNsource_linkN
source_urlN
toc_backlinksentryfootnote_backlinksK
sectnum_xformKstrip_commentsNstrip_elements_with_classesN
strip_classesNreport_levelK
halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjà error_encodingUTF-8error_encoding_error_handlerbackslashreplace
language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid
dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh*_destinationN
_config_files]pep_referencesNpep_base_url https://www.python.org/dev/peps/pep_file_url_templatepep-%04drfc_referencesNrfc_base_urlhttps://tools.ietf.org/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabledraw_enabledKsyntax_highlightlongsmart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform
docinfo_xformKsectsubtitle_xformembed_stylesheetcloak_email_addressesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j h×hÔj j u nametypes}(j Nh×Nj Nuh}(j hhÔhwj hÚu
footnote_refs}
citation_refs}
autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_startKparse_messages](h system_message)}(hhh]h,)}(hmalformed hyperlink target.h]hmalformed hyperlink target.
}(hhhj ubah}(h]h!]h#]h%]h']uh)h+hj ubah}(h]h!]h#]h%]h']levelKtypeWARNINGlineKsourceh*uh)j hhhhhh*hKubj )}(hhh]h,)}(h?Explicit markup ends without a blank line; unexpected unindent.h]h?Explicit markup ends without a blank line; unexpected unindent.
}(hhhj; ubah}(h]h!]h#]h%]h']uh)h+hj8 ubah}(h]h!]h#]h%]h']levelKtypej5 lineKsourceh*uh)j hhhhhh*hKubetransform_messages]transformerN
decorationNhhub.