torch.nn.functional.hardsigmoid# torch.nn.functional.hardsigmoid(input, inplace=False)[source]# 将 Hardsigmoid 函数逐元素应用。 Hardsigmoid(x)={0if x≤−3,1if x≥+3,x/6+1/2otherwise\text{Hardsigmoid}(x) = \begin{cases} 0 & \text{if~} x \le -3, \\ 1 & \text{if~} x \ge +3, \\ x / 6 + 1 / 2 & \text{otherwise} \end{cases} Hardsigmoid(x)=⎩⎨⎧01x/6+1/2if x≤−3,if x≥+3,otherwise 参数 inplace (bool) – 如果设置为 True,则原地执行此操作。默认为 False 返回类型 张量 更多详情请参阅 Hardsigmoid。
torch.nn.functional.hardsigmoid# torch.nn.functional.hardsigmoid(input, inplace=False)[source]# 将 Hardsigmoid 函数逐元素应用。 Hardsigmoid(x)={0if x≤−3,1if x≥+3,x/6+1/2otherwise\text{Hardsigmoid}(x) = \begin{cases} 0 & \text{if~} x \le -3, \\ 1 & \text{if~} x \ge +3, \\ x / 6 + 1 / 2 & \text{otherwise} \end{cases} Hardsigmoid(x)=⎩⎨⎧01x/6+1/2if x≤−3,if x≥+3,otherwise 参数 inplace (bool) – 如果设置为 True,则原地执行此操作。默认为 False 返回类型 张量 更多详情请参阅 Hardsigmoid。