Spec-Zone.ru › PyTorch 2

torch.nn.functional.hardswish

torch.nn.functional.hardswish(input, inplace=False) [source]

Применяет функцию hardswish поэлементно, как описано в статье:

Поиск MobileNetV3.

Hardswish(x)={0если x≤−3,xесли x≥+3,x⋅(x+3)/6в противном случае\text{Hardswish}(x) = \begin{cases} 0 & \text{if~} x \le -3, \\ x & \text{if~} x \ge +3, \\ x \cdot (x + 3) /6 & \text{otherwise} \end{cases}

См. Hardswish для получения дополнительной информации.

Тип возвращаемого значения

Тензор

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.functional.hardswish.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API