"vscode:/vscode.git/clone" did not exist on "1bfda53125ba9be8b4639781f094040af7c56ba9"
syncbn.rst 914 Bytes
Newer Older
Hang Zhang's avatar
Hang Zhang committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.. role:: hidden
    :class: hidden-section

Synchronized BatchNorm
======================

The current BN is implementated insynchronized accross the gpus, which is a big problem for memory consuming tasks such as Semantic Segmenation, since the mini-batch is very small. 
To synchronize the batchnorm accross multiple gpus is not easy to implment within the current Dataparallel framework. We address this difficulty by making each layer 'self-parallel', that is accepting the inputs from multi-gpus. Therefore, we can handle different layers seperately for synchronizing it across gpus.

.. currentmodule:: encoding

Functions
---------

:hidden:`batchnormtrain`
~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: batchnormtrain
    :members:

:hidden:`batchnormeval`
~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: batchnormeval
    :members:

:hidden:`sum_square`
~~~~~~~~~~~~~~~~~~~~

.. autoclass:: sum_square
    :members: