評價此頁

threshold#

class torch.ao.nn.quantized.functional.threshold(input, threshold, value)[原始碼]#

按元素應用量化版本的閾值函式

x={xif x>thresholdvalueotherwisex = \begin{cases} x & \text{if~} x > \text{threshold} \\ \text{value} & \text{otherwise} \end{cases}

更多詳情請參閱 Threshold

返回型別

張量