flâneur — a map of the web's best reading

ReLU — PyTorch 2.12 documentation

docs.pytorch.org · 212 words · saved by 1 readers

By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive. Privacy Policy By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive. Privacy Policy. © PyTorch. Copyright © The Linux Foundation®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For more information, including terms of use, privacy policy, and trademark usage, please see our Policies page. Trademark Usage. Privacy Policy. To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow

ReLU # class torch.nn. ReLU ( inplace = False ) [source] # Applies the rectified linear unit function element-wise. ReLU ( x ) = ( x ) + = max ⁡ ( 0 , x ) \text{ReLU}(x) = (x)^+ = \max(0, x) ReLU ( x ) = ( x ) + = max ( 0 , x ) Parameters : inplace ( bool ) – can optionally do the operation in-place. Default: False Shape: Input: ( ∗ ) (*) ( ∗ ) , where ∗ * ∗ means any number of dimensions. Output: ( ∗ ) (*) ( ∗ ) , same shape as the input. Examples: >>> m = nn . ReLU () >>> input = torch . randn ( 2 ) >>> output = m ( input ) An implementation of CReLU - https : // arxiv . org / abs / 1603.052

Explore this link on the map →

related reading