Skip to contents

It is defined as: hard_tanh(x) = -1 for x < -1, hard_tanh(x) = x for -1 <= x <= 1, hard_tanh(x) = 1 for x > 1.

Usage

activation_hard_tanh(x)

Arguments

x

Input tensor.

Value

A tensor, the result from applying the activation to the input tensor x.