Class GroupNormImpl#
Defined in File normalization.h
Page Contents
Inheritance Relationships#
Base Type#
public torch::nn::Cloneable< GroupNormImpl >
(Template Class Cloneable)
Class Documentation#
-
class GroupNormImpl : public torch::nn::Cloneable<GroupNormImpl>#
Applies Group Normalization over a mini-batch of inputs as described in the paper
Group Normalization
_ .See https://pytorch.org/docs/main/nn.html#torch.nn.GroupNorm to learn about the exact behavior of this module.
See the documentation for
torch::nn::GroupNormOptions
class to learn what constructor arguments are supported for this module.Example:
GroupNorm model(GroupNormOptions(2, 2).eps(2e-5).affine(false));
Public Functions
-
inline GroupNormImpl(int64_t num_groups, int64_t num_channels)#
-
explicit GroupNormImpl(const GroupNormOptions &options_)#
-
virtual void reset() override#
reset()
must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules.
-
void reset_parameters()#
-
virtual void pretty_print(std::ostream &stream) const override#
Pretty prints the
GroupNorm
module into the givenstream
.
-
Tensor forward(const Tensor &input)#
Public Members
-
GroupNormOptions options#
The options with which this module was constructed.
-
Tensor weight#
The learned weight.
-
Tensor bias#
The learned bias.
-
inline GroupNormImpl(int64_t num_groups, int64_t num_channels)#