pytorch-inference
pytorch::Hardtanh Class Reference

#include <Activations.hpp>

Inheritance diagram for pytorch::Hardtanh:
pytorch::Layer

Public Member Functions

 Hardtanh (const float &low=-1.f, const float &high=1.f)
 
std::vector< tensor > forward (const std::vector< tensor > &input)
 Forward function for this layer. More...
 
std::vector< tensor > operator() (const std::vector< tensor > &input)
 Forward function for this layer. More...
 

Private Attributes

const float low
 
const float high
 

Detailed Description

Todo:
: docs

Constructor & Destructor Documentation

◆ Hardtanh()

pytorch::Hardtanh::Hardtanh ( const float &  low = -1.f,
const float &  high = 1.f 
)
inlineexplicit

Member Function Documentation

◆ forward()

std::vector<tensor> pytorch::Hardtanh::forward ( const std::vector< tensor > &  input)
inlinevirtual

Forward function for this layer.

Parameters
inputThe input to this layer
Returns
The output of this layer

Implements pytorch::Layer.

◆ operator()()

std::vector<tensor> pytorch::Hardtanh::operator() ( const std::vector< tensor > &  input)
inlinevirtual

Forward function for this layer.

Parameters
inputThe input to this layer
Returns
The output of this layer

Implements pytorch::Layer.

Member Data Documentation

◆ high

const float pytorch::Hardtanh::high
private

◆ low

const float pytorch::Hardtanh::low
private

The documentation for this class was generated from the following file: