converter.BN_Folder
converter.BN_Folder(self)
A class to perform batch normalization folding on a model.
Examples
>>> bn_folder = BN_Folder()
>>> bn_folder.fold(some_model)Methods
| Name | Description | 
|---|---|
| fold | Performs batch normalization folding on a model. | 
fold
converter.BN_Folder.fold(self, model)
Performs batch normalization folding on a model.
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
model | 
torch.nn.Module | The input model. | required | 
Returns
| Type | Description | 
|---|---|
| torch.nn.Module | The model with batch normalization folded. | 
Examples
>>> bn_folder = BN_Folder()
>>> bn_folder.fold(some_model)