ElementWiseBlock

Contents

ElementWiseBlock#

class brainstate.nn.ElementWiseBlock(name=None)#

Marker base class for element-wise neural network modules.

ElementWiseBlock is a thin Module subclass used to tag modules that apply an element-wise transformation to their input (for example activation functions or dropout). It adds no behavior of its own; it exists so that such modules can be recognized by isinstance checks and treated specially by containers such as Sequential.