Class HardtanhImpl¶
Defined in File activation.h
Page Contents
Inheritance Relationships¶
Base Type¶
public torch::nn::Cloneable< HardtanhImpl >
(Template Class Cloneable)
Class Documentation¶
-
class HardtanhImpl : public torch::nn::Cloneable<HardtanhImpl>¶
Applies the HardTanh function element-wise.
See https://pytorch.org/docs/main/nn.html#torch.nn.Hardtanh to learn about the exact behavior of this module.
See the documentation for
torch::nn::HardtanhOptions
class to learn what constructor arguments are supported for this module.Example:
Hardtanh model(HardtanhOptions().min_val(-42.42).max_val(0.42).inplace(true));
Public Functions
-
explicit HardtanhImpl(const HardtanhOptions &options_ = {})¶
-
Tensor forward(Tensor input)¶
Public Members
-
HardtanhOptions options¶
The options with which this
Module
was constructed.
-
explicit HardtanhImpl(const HardtanhOptions &options_ = {})¶