All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 233 of file nnet-utils.h.

Constructor & Destructor Documentation

Member Data Documentation

bool collapse_affine

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

Referenced by ModelCollapser::CollapseComponents().

bool collapse_batchnorm

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

Referenced by ModelCollapser::CollapseComponents().

bool collapse_dropout

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

Referenced by ModelCollapser::CollapseComponents().

bool collapse_scale

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

Referenced by ModelCollapser::CollapseComponents().


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