Files
mlx/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.step.doctree

29 lines
7.8 KiB
Plaintext
Raw Normal View History

2024-01-17 17:15:29 -08:00
<EFBFBD><05><00>sphinx.addnodes<65><73>document<6E><74><EFBFBD>)<29><>}<7D>(<28> rawsource<63><65><00><>children<65>]<5D><>docutils.nodes<65><73>section<6F><6E><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09>title<6C><65><EFBFBD>)<29><>}<7D>(h<05> mlx.nn.step<65>h]<5D>h <09>Text<78><74><EFBFBD><EFBFBD> mlx.nn.step<65><70><EFBFBD><EFBFBD><EFBFBD>}<7D>(<28>parent<6E>h<11> _document<6E>h<03>source<63>N<EFBFBD>line<6E>Nuba<62>
attributes<EFBFBD>}<7D>(<28>ids<64>]<5D><>classes<65>]<5D><>names<65>]<5D><>dupnames<65>]<5D><>backrefs<66>]<5D>u<EFBFBD>tagname<6D>hhh hhh<1D>U/Users/awnihannun/repos/mlx/docs/src/python/nn/_autosummary_functions/mlx.nn.step.rst<73>hKubh<00>index<65><78><EFBFBD>)<29><>}<7D>(hhh]<5D>h}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><>entries<65>]<5D>(<28>single<6C><65>step (class in mlx.nn)<29><> mlx.nn.step<65>hNt<4E>auh+h-hh hhhNhNubh<00>desc<73><63><EFBFBD>)<29><>}<7D>(hhh]<5D>(h<00>desc_signature<72><65><EFBFBD>)<29><>}<7D>(h<05>0step(x: ~mlx.core.array, threshold: float = 0.0)<29>h]<5D>(h<00>desc_annotation<6F><6E><EFBFBD>)<29><>}<7D>(h<05>2[<#text: 'class'>, <desc_sig_space: <#text: ' '>>]<5D>h]<5D>(h<16>class<73><73><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhKhhhNhNubh<00>desc_sig_space<63><65><EFBFBD>)<29><>}<7D>(h<05> <20>h]<5D>h<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhUhhhNhNubah}<7D>(h!]<5D>h#]<5D><>w<>ah%]<5D>h']<5D>h)]<5D>uh+hShhKubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> xml:space<63><65>preserve<76>uh+hIhhEhhh<1D>k/Users/awnihannun/repos/mlx/python/mlx/nn/layers/activations.py:docstring of mlx.nn.layers.activations.step<65>hNubh<00> desc_addname<6D><65><EFBFBD>)<29><>}<7D>(h<05>mlx.nn.<2E>h]<5D>h<16>mlx.nn.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhohhhNhNubah}<7D>(h!]<5D>h#]<5D>(<28> sig-prename<6D><65> descclassname<6D>eh%]<5D>h']<5D>h)]<5D>hjhkuh+hmhhEhhhhlhNubh<00> desc_name<6D><65><EFBFBD>)<29><>}<7D>(h<05>step<65>h]<5D>h<16>step<65><70><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>(<28>sig-name<6D><65>descname<6D>eh%]<5D>h']<5D>h)]<5D>hjhkuh+hhhEhhhhlhNubh<00>desc_parameterlist<73><74><EFBFBD>)<29><>}<7D>(h<05>*x: ~mlx.core.array, threshold: float = 0.0<EFBFBD>h]<5D>(h<00>desc_parameter<65><72><EFBFBD>)<29><>}<7D>(h<05> x: arrayarray<61>h]<5D>(h<00> desc_sig_name<6D><65><EFBFBD>)<29><>}<7D>(h<05>x<>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D><>n<>ah%]<5D>h']<5D>h)]<5D>uh+h<>hh<>ubh<00>desc_sig_punctuation<6F><6E><EFBFBD>)<29><>}<7D>(h<05>:<3A>h]<5D>h<16>:<3A><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D><>p<>ah%]<5D>h']<5D>h)]<5D>uh+h<>hh<>ubhT)<29><>}<7D>(h<05> <20>h]<5D>h<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h`ah%]<5D>h']<5D>h)]<5D>uh+hShh<>ubh<62>)<29><>}<7D>(h<05>
arrayarray<EFBFBD>h]<5D>h<00> pending_xref<65><66><EFBFBD>)<29><>}<7D>(hhh]<5D>(h<00>pending_xref_condition<6F><6E><EFBFBD>)<29><>}<7D>(h<05>array<61>h]<5D>h<16>array<61><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> condition<6F><6E>resolved<65>uh+h<>hh<>ubh<62>)<29><>}<7D>(h<05>array<61>h]<5D>h<16>array<61><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> condition<6F><6E>*<2A>uh+h<>hh<>ubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> refdomain<69><6E>py<70><79>reftype<70><65>class<73><73> reftarget<65><74>mlx.core.array<61><79> refspecific<69><63><EFBFBD> py:module<6C><65>mlx.nn<6E><6E>py:class<73>Nuh+h<>hh<>ubah}<7D>(h!]<5D>h#]<5D>h<EFBFBD>ah%]<5D>h']<5D>h)]<5D>uh+h<>hh<>ubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>hjhkuh+h<>hh<>ubh<62>)<29><>}<7D>(h<05>threshold: floatfloat = 0.0<EFBFBD>h]<5D>(h<>)<29><>}<7D>(h<05> threshold<6C>h]<5D>h<16> threshold<6C><64><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhhhNhNubah}<7D>(h!]<5D>h#]<5D>h<EFBFBD>ah%]<5D>h']<5D>h)]<5D>uh+h<>hjubh<62>)<29><>}<7D>(h<05>:<3A>h]<5D>h<16>:<3A><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj&hhhNhNubah}<7D>(h!]<5D>h#]<5D>h<EFBFBD>ah%]<5D>h']<5D>h)]<5D>uh+h<>hjubhT)<29><>}<7D>(h<05> <20>h]<5D>h<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj4hhhNhNubah}<7D>(h!]<5D>h#]<5D>h`ah%]<5D>h']<5D>h)]<5D>uh+hShjubh<62>)<29><>}<7D>(h<05>
floatfloat<EFBFBD>h]<5D>h<EFBFBD>)<29><>}<7D>(hhh]<5D>(h<>)<29><>}<7D>(h<05>float<61>h]<5D>h<16>float<61><74><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjIhhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> condition<6F>h<EFBFBD>uh+h<>hjFubh<62>)<29><>}<7D>(h<05>float<61>h]<5D>h<16>float<61><74><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjXhhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> condition<6F>h<EFBFBD>uh+h<>hjFubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><> refdomain<69>h<EFBFBD><68>reftype<70>j<00> reftarget<65><74>float<61><74> refspecific<69><63><EFBFBD> py:module<6C>j<00>py:class<73>Nuh+h<>hjBubah}<7D>(h!]<5D>h#]<5D>h<EFBFBD>ah%]<5D>h']<5D>h)]<5D>uh+h<>hjubhT)<29><>}<7D>(h<05> <20>h]<5D>h<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjzhhhNhNubah}<7D>(h!]<5D>h#]<5D>h`ah%]<5D>h']<5D>h)]<5D>uh+hShjubh<00>desc_sig_operator<6F><72><EFBFBD>)<29><>}<7D>(h<05>=<3D>h]<5D>h<16>=<3D><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hhhNhNubah}<7D>(h!]<5D>h#]<5D><>o<>ah%]<5D>h']<5D>h)]<5D>uh+j<>hjubhT)<29><>}<7D>(h<05> <20>h]<5D>h<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h`ah%]<5D>h']<5D>h)]<5D>uh+hShjubh <09>inline<6E><65><EFBFBD>)<29><>}<7D>(h<05>0.0<EFBFBD>h]<5D>h<16>0.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hhhNhNubah}<7D>(h!]<5D>h#]<5D><> default_value<75>ah%]<5D>h']<5D>h)]<5D><>support_smartquotes<65><73>uh+j<>hjubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>hjhkuh+h<>hh<>ubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>hjhkuh+h<>hhEhhhhlhNubeh}<7D>(h!]<5D>h<ah#]<5D>(<28>sig<69><67>
sig-object<63>eh%]<5D>h']<5D>h)]<5D><>module<6C><65>mlx.nn<6E>jh<06>fullname<6D>h<EFBFBD>uh+hCh<1D>k/Users/awnihannun/repos/mlx/python/mlx/nn/layers/activations.py:docstring of mlx.nn.layers.activations.step<65>hKhh@hhubh<00> desc_content<6E><74><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09> paragraph<70><68><EFBFBD>)<29><>}<7D>(h<05>%Applies the Step Activation Function.<2E>h]<5D>h<16>%Applies the Step Activation Function.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j<>h<1D>k/Users/awnihannun/repos/mlx/python/mlx/nn/layers/activations.py:docstring of mlx.nn.layers.activations.step<65>hKhj<>hhubj<62>)<29><>}<7D>(h<05><>This function implements a binary step activation, where the output is set
to 1 if the input is greater than a specified threshold, and 0 otherwise.<2E>h]<5D>h<16><>This function implements a binary step activation, where the output is set
to 1 if the input is greater than a specified threshold, and 0 otherwise.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j<>hj<>hKhj<>hhubh <09>
math_block<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(h<05>z\text{step}(x) = \begin{cases}
0 & \text{if } x < \text{threshold} \\
1 & \text{if } x \geq \text{threshold}
\end{cases}
<EFBFBD>h]<5D>h<16>z\text{step}(x) = \begin{cases}
0 & \text{if } x < \text{threshold} \\
1 & \text{if } x \geq \text{threshold}
\end{cases}
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>hj<>sbah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><>docname<6D><65>,python/nn/_autosummary_functions/mlx.nn.step<65><70>number<65>N<EFBFBD>label<65>N<EFBFBD>nowrap<61><70>hjhkuh+j<>hj<>hKhj<>hhubh <09>
field_list<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(hhh]<5D>h <09>field<6C><64><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09>
field_name<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(h<05>
Parameters<EFBFBD>h]<5D>h<16>
Parameters<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+jhjhhlhKubh <09>
field_body<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(hhh]<5D>j<EFBFBD>)<29><>}<7D>(h<05>'threshold -- The value to threshold at.<2E>h]<5D>(h<00>literal_strong<6E><67><EFBFBD>)<29><>}<7D>(h<05> threshold<6C>h]<5D>h<16> threshold<6C><64><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj/hhhNhNubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j-hj)ubh<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj)hhhNhNubh<16>The value to threshold at.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj)hhhNhNubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j<>hj&ubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j$hjubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+jhj ubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j
hj<>hhhNhNubeh}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D>uh+j<>hh@hhhhlhNubeh}<7D>(h!]<5D>h#]<5D>(<28>py<70><79>class<73>eh%]<5D>h']<5D>h)]<5D><>domain<69>jf<00>objtype<70>jg<00>desctype<70>jg<00>noindex<65><78>uh+h>hhhh hNhNubeh}<7D>(h!]<5D><> mlx-nn-step<65>ah#]<5D>h%]<5D><> mlx.nn.step<65>ah']<5D>h)]<5D>uh+h
hhhhhh,hKubah}<7D>(h!]<5D>h#]<5D>h%]<5D>h']<5D>h)]<5D><>source<63>h,uh+h<01>current_source<63>N<EFBFBD> current_line<6E>N<EFBFBD>settings<67><73>docutils.frontend<6E><64>Values<65><73><EFBFBD>)<29><>}<7D>(hN<> generator<6F>N<EFBFBD> datestamp<6D>N<EFBFBD> source_link<6E>N<EFBFBD>
source_url<EFBFBD>N<EFBFBD> toc_backlinks<6B><73>entry<72><79>footnote_backlinks<6B>K<01> sectnum_xform<72>K<01>strip_comments<74>N<EFBFBD>strip_elements_with_classes<65>N<EFBFBD> strip_classes<65>N<EFBFBD> report_level<65>K<02>
halt_level<EFBFBD>K<05>exit_status_level<65>K<05>debug<75>N<EFBFBD>warning_stream<61>N<EFBFBD> traceback<63><6B><EFBFBD>input_encoding<6E><67> utf-8-sig<69><67>input_encoding_error_handler<65><72>strict<63><74>output_encoding<6E><67>utf-8<><38>output_encoding_error_handler<65>j<EFBFBD><00>error_encoding<6E><67>utf-8<><38>error_encoding_error_handler<65><72>backslashreplace<63><65> language_code<64><65>en<65><6E>record_dependencies<65>N<EFBFBD>config<69>N<EFBFBD> id_prefix<69>h<06>auto_id_prefix<69><78>id<69><64> dump_settings<67>N<EFBFBD>dump_internals<6C>N<EFBFBD>dump_transforms<6D>N<EFBFBD>dump_pseudo_xml<6D>N<EFBFBD>expose_internals<6C>N<EFBFBD>strict_visitor<6F>N<EFBFBD>_disable_config<69>N<EFBFBD>_source<63>h,<2C> _destination<6F>N<EFBFBD> _config_files<65>]<5D><>file_insertion_enabled<65><64><EFBFBD> raw_enabled<65>K<01>line_length_limit<69>M'<27>pep_references<65>N<EFBFBD> pep_base_url<72><6C>https://peps.python.org/<2F><>pep_file_url_template<74><65>pep-%04d<34><64>rfc_references<65>N<EFBFBD> rfc_base_url<72><6C>&https://datatracker.ietf.org/doc/html/<2F><> tab_width<74>K<08>trim_footnote_reference_space<63><65><EFBFBD>syntax_highlight<68><74>long<6E><67> smart_quotes<65><73><EFBFBD>smartquotes_locales<65>]<5D><>character_level_inline_markup<75><70><EFBFBD>doctitle_xform<72><6D><EFBFBD> docinfo_xform<72>K<01>sectsubtitle_xform<72><6D><EFBFBD> image_loading<6E><67>link<6E><6B>embed_stylesheet<65><74><EFBFBD>cloak_email_addresses<65><73><EFBFBD>section_self_link<6E><6B><EFBFBD>env<6E>Nub<75>reporter<65>N<EFBFBD>indirect_targets<74>]<5D><>substitution_defs<66>}<7D><>substitution_names<65>}<7D><>refnames<65>}<7D><>refids<64>}<7D><>nameids<64>}<7D>jtjqs<> nametypes<65>}<7D>jt<00>sh!}<7D>(jqh h<hEu<45> footnote_refs<66>}<7D><> citation_refs<66>}<7D><> autofootnotes<65>]<5D><>autofootnote_refs<66>]<5D><>symbol_footnotes<65>]<5D><>symbol_footnote_refs<66>]<5D><> footnotes<65>]<5D><> citations<6E>]<5D><>autofootnote_start<72>K<01>symbol_footnote_start<72>K<00>
id_counter<EFBFBD><EFBFBD> collections<6E><73>Counter<65><72><EFBFBD>}<7D><><EFBFBD>R<EFBFBD><52>parse_messages<65>]<5D><>transform_messages<65>]<5D><> transformer<65>N<EFBFBD> include_log<6F>]<5D><>
decoration<EFBFBD>Nhhub.