Class Hardshrink

Inheritance Relationships

Base Type

Class Documentation

class torch::nn::Hardshrink : public torch::nn::ModuleHolder<HardshrinkImpl>

A ModuleHolder subclass for HardshrinkImpl.

See the documentation for HardshrinkImpl class to learn what methods it provides, and examples of how to use Hardshrink with torch::nn::HardshrinkOptions. See the documentation for ModuleHolder to learn about PyTorch’s module storage semantics.

Public Types

using Impl = HardshrinkImpl


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources