Template Class ConstantPadImpl

Inheritance Relationships

Base Type

Class Documentation

template<size_t D, typename Derived>
class torch::nn::ConstantPadImpl : public torch::nn::Cloneable<Derived>

Base class for all (dimension-specialized) ConstantPad modules.

Public Functions

ConstantPadImpl(ExpandingArray<D * 2> padding, double value)
ConstantPadImpl(const ConstantPadOptions<D> &options_)
void reset() override

reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules.

Tensor forward(const Tensor &input)
void pretty_print(std::ostream &stream) const override

Pretty prints the ConstantPad{1,2}d module into the given stream.

Public Members

ConstantPadOptions<D> options

The options with which this Module was constructed.


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