CollapseModelConfig Struct Reference

Config class for the CollapseModel function. More...

#include <nnet-utils.h>

Collaboration diagram for CollapseModelConfig:

Public Member Functions

 CollapseModelConfig ()

Public Attributes

bool collapse_dropout
bool collapse_batchnorm
bool collapse_affine
bool collapse_scale

Detailed Description

Config class for the CollapseModel function.

This function is reponsible for collapsing together sequential components where doing so could make the test-time operation more efficient. For example, dropout components and batch-norm components that are in test mode can be combined with the next layer; and if there are successive affine components it may also be possible to combine these under some circumstances.

It expects batch-norm components to be in test mode; you should probably call SetBatchnormTestMode() and SetDropoutTestMode() before CollapseModel().

Definition at line 240 of file nnet-utils.h.

Constructor & Destructor Documentation

◆ CollapseModelConfig()

Member Data Documentation

◆ collapse_affine

bool collapse_affine

Definition at line 243 of file nnet-utils.h.

◆ collapse_batchnorm

bool collapse_batchnorm

Definition at line 242 of file nnet-utils.h.

◆ collapse_dropout

bool collapse_dropout

Definition at line 241 of file nnet-utils.h.

◆ collapse_scale

bool collapse_scale

Definition at line 244 of file nnet-utils.h.

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