13 lines (10 with data), 4.8 kB
ÇĽú îdocutils.nodesöîdocumentöôö)üö}ö(î rawsourceöî öîchildrenö]öh îsectionöôö)üö}ö(hhh]ö(h îtitleöôö)üö}ö(hîMLPöh]öh îTextöôöîMLPöůöüö}ö(hhîparentöhhhîsourceöNîlineöNubaî
attributesö}ö(îidsö]öîclassesö]öînamesö]öîdupnamesö]öîbackrefsö]öuîtagnameöhhhhhhîK/Users/futianfan/Downloads/spring2020/DeepPurpose/docs/source/notes/mlp.rstöhKubh î
literal_blocköôö)üö}ö(hî+class DeepPurpose.models.MLP(nn.Sequential)öh]öhî+class DeepPurpose.models.MLP(nn.Sequential)öůöüö}ö(hhhh-ubah}ö(h]öh!]öh#]öh%]öh']öî xml:spaceöîpreserveöîforceöëîlanguageöîpythonöîhighlight_argsö}öuh)h+hh*hKhhhhubh î paragraphöôö)üö}ö(hîMulti-Layer Perceptronöh]öhîMulti-Layer Perceptronöůöüö}ö(hhFhhDhhhNhNubah}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hK
hhhhubhC)üö}ö(hî**constructor**öh]öh îstrongöôö)üö}ö(hhTh]öhîconstructoröůöüö}ö(hhhhXubah}ö(h]öh!]öh#]öh%]öh']öuh)hVhhRubah}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hKhhhhubh,)üö}ö(hî2__init__(self, input_dim, hidden_dim, hidden_dims)öh]öhî2__init__(self, input_dim, hidden_dim, hidden_dims)öůöüö}ö(hhhhkubah}ö(h]öh!]öh#]öh%]öh']öh;h<h=ëh>îpythonöh@}öuh)h+hh*hKhhhhubh îbullet_listöôö)üö}ö(hhh]ö(h î list_itemöôö)üö}ö(hî1**input_dim** (int) - dimension of input feature.öh]öhC)üö}ö(hhäh]ö(hW)üö}ö(hî
**input_dim**öh]öhî input_dimöůöüö}ö(hhhhëubah}ö(h]öh!]öh#]öh%]öh']öuh)hVhhćubhî$ (int) - dimension of input feature.öůöüö}ö(hî$ (int) - dimension of input feature.öhhćubeh}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hKhhéubah}ö(h]öh!]öh#]öh%]öh']öuh)hÇhh}hhhh*hNubhü)üö}ö(hî3**hidden_dim** (int) - dimension of hidden layer.
öh]öhC)üö}ö(hî1**hidden_dim** (int) - dimension of hidden layer.öh]ö(hW)üö}ö(hî**hidden_dim**öh]öhî
hidden_dimöůöüö}ö(hhhh░ubah}ö(h]öh!]öh#]öh%]öh']öuh)hVhhČubhî# (int) - dimension of hidden layer.öůöüö}ö(hî# (int) - dimension of hidden layer.öhhČubeh}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hKhhĘubah}ö(h]öh!]öh#]öh%]öh']öuh)hÇhh}hhhh*hNubeh}ö(h]öh!]öh#]öh%]öh']öîbulletöî*öuh)h{hh*hKhhhhubhC)üö}ö(hîA**Calling functions** implement the feedforward procedure of MLP.öh]ö(hW)üö}ö(hî**Calling functions**öh]öhîCalling functionsöůöüö}ö(hhhh█ubah}ö(h]öh!]öh#]öh%]öh']öuh)hVhhÎubhî, implement the feedforward procedure of MLP.öůöüö}ö(hî, implement the feedforward procedure of MLP.öhhÎhhhNhNubeh}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hKhhhhubh,)üö}ö(hîforward(self, v)öh]öhîforward(self, v)öůöüö}ö(hhhh˘ubah}ö(h]öh!]öh#]öh%]öh']öh;h<h=ëh>îpythonöh@}öuh)h+hh*hKhhhhubh|)üö}ö(hhh]öhü)üö}ö(hî**v**
öh]öhC)üö}ö(hî**v**öh]öhW)üö}ö(hj
h]öhîvöůöüö}ö(hhhj ubah}ö(h]öh!]öh#]öh%]öh']öuh)hVhj ubah}ö(h]öh!]öh#]öh%]öh']öuh)hBhh*hKhj ubah}ö(h]öh!]öh#]öh%]öh']öuh)hÇhj hhhh*hNubah}ö(h]öh!]öh#]öh%]öh']öhŇhÍuh)h{hh*hKhhhhubeh}ö(h]öîmlpöah!]öh#]öîmlpöah%]öh']öuh)h hhhhhh*hKubah}ö(h]öh!]öh#]öh%]öh']öîsourceöh*uh)hîcurrent_sourceöNîcurrent_lineöNîsettingsöîdocutils.frontendöîValuesöôö)üö}ö(hNî generatoröNî datestampöNîsource_linköNî
source_urlöNî
toc_backlinksöîentryöîfootnote_backlinksöKî
sectnum_xformöKîstrip_commentsöNîstrip_elements_with_classesöNî
strip_classesöNîreport_levelöKî
halt_levelöKîexit_status_levelöKîdebugöNîwarning_streamöNî tracebacköłîinput_encodingöî utf-8-sigöîinput_encoding_error_handleröîstrictöîoutput_encodingöîutf-8öîoutput_encoding_error_handleröjY îerror_encodingöîUTF-8öîerror_encoding_error_handleröîbackslashreplaceöî
language_codeöîenöîrecord_dependenciesöNîconfigöNî id_prefixöhîauto_id_prefixöîidöî
dump_settingsöNîdump_internalsöNîdump_transformsöNîdump_pseudo_xmlöNîexpose_internalsöNîstrict_visitoröNî_disable_configöNî_sourceöh*î_destinationöNî
_config_filesö]öîpep_referencesöNîpep_base_urlöî https://www.python.org/dev/peps/öîpep_file_url_templateöîpep-%04döîrfc_referencesöNîrfc_base_urlöîhttps://tools.ietf.org/html/öî tab_widthöKîtrim_footnote_reference_spaceöëîfile_insertion_enabledöłîraw_enabledöKîsyntax_highlightöîlongöîsmart_quotesöłîsmartquotes_localesö]öîcharacter_level_inline_markupöëîdoctitle_xformöëî
docinfo_xformöKîsectsubtitle_xformöëîembed_stylesheetöëîcloak_email_addressesöłîenvöNubîreporteröNîindirect_targetsö]öîsubstitution_defsö}öîsubstitution_namesö}öîrefnamesö}öîrefidsö}öînameidsö}öj3 j0 sî nametypesö}öj3 Nsh}öj0 hsî
footnote_refsö}öî
citation_refsö}öî
autofootnotesö]öîautofootnote_refsö]öîsymbol_footnotesö]öîsymbol_footnote_refsö]öî footnotesö]öî citationsö]öîautofootnote_startöKîsymbol_footnote_startöK î
id_counteröîcollectionsöîCounteröôö}öůöRöîparse_messagesö]öîtransform_messagesö]öîtransformeröNî
decorationöNhhub.