MCPcopy Create free account
hub / github.com/ml-explore/mlx / tanh

Function tanh

mlx/ops.cpp:3060–3064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3058}
3059
3060array tanh(const array& a, StreamOrDevice s /* = {} */) {
3061 auto dtype = at_least_float(a.dtype());
3062 auto input = astype(a, dtype, s);
3063 return array(a.shape(), dtype, std::make_shared<Tanh>(to_stream(s)), {input});
3064}
3065
3066array arcsinh(const array& a, StreamOrDevice s /* = {} */) {
3067 auto dtype = at_least_float(a.dtype());

Callers 3

vmapMethod · 0.70
operator()Method · 0.50
operator()Method · 0.50

Calls 4

astypeFunction · 0.85
to_streamFunction · 0.85
at_least_floatFunction · 0.70
arrayFunction · 0.70

Tested by

no test coverage detected