评价此页

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

返回类型

张量